If you appreciate the work done within the wiki, please consider supporting The Cutting Room Floor on Patreon. Thanks for all your support!

Stick With It (Windows)

From The Cutting Room Floor
Jump to navigation Jump to search

Title Screen

Stick With It

Developer: Sam Hogan
Publisher: Sam Hogan
Platform: Windows
Released internationally: May 23, 2020


CodeIcon.png This game has unused code.
DevMessageIcon.png This game has a hidden developer message.
GraphicsIcon.png This game has unused graphics.


PrereleaseIcon.png This game has a prerelease article

Stick With It is a rage game by the creator Sam Hogan.

Sub-Page

Read about prerelease information and/or media for this game.
Prerelease Info

Unused Graphics

Spike

Blue player : game over!

A unused graphic of spikes which would've made the player character pop, making them restart from the last checkpoint. This was later reused for the the mobile version of the game.

Placeholder Texture

SWI-AreaTex.png

A placeholder texture.

Hidden Code

A script named heydontlookinhere (Hey dont look in here) is found in gamedata.

Unused Code

Placeholder Script

Found in the coding. The one named arrowSpin is unused.

using System;
using UnityEngine;
using UnityEngine.Events;

// Token: 0x02000004 RID: 4
public class ArrowSpin : MonoBehaviour
{
	// Token: 0x06000009 RID: 9 RVA: 0x00002144 File Offset: 0x00000344
	private void Start()
	{
		EventManager.StartListening("CanJump", delegate
		{
			this.ShowArrow();
		});
		EventManager.StartListening("NoJump", delegate
		{
			base.gameObject.SetActive(false);
		});
		EventManager.StartListening("Jump", delegate
		{
			if (!this.arrowEnabled)
			{
				return;
			}
			this.dummyArrow.SetActive(false);
			this.dummyArrow.transform.position = this.arrowTransform.position;
			this.dummyArrow.transform.rotation = this.arrowTransform.rotation;
			this.dummyArrow.SetActive(true);
		});
		EventManager.StartListening("EndReached", new UnityAction(this.DisableArrow));
		base.gameObject.SetActive(false);
		this.arrowTransform = base.transform.GetChild(0);
	}

	// Token: 0x0600000A RID: 10 RVA: 0x000021C8 File Offset: 0x000003C8
	private void Update()
	{
		if (!this.arrowEnabled)
		{
			return;
		}
		this.curRot += this.spinSpeed * Time.deltaTime * (float)(this.clockwise ? -1 : 1);
		if (this.fullRotationMode)
		{
			this.curRot = Mathf.Repeat(this.curRot, 360f);
		}
		else if (this.clockwise && this.curRot < this.lowerBoundAngle)
		{
			this.clockwise = false;
			this.curRot = this.lowerBoundAngle;
		}
		else if (!this.clockwise && this.curRot > this.upperBoundAngle)
		{
			this.clockwise = true;
			this.curRot = this.upperBoundAngle;
		}
		base.transform.rotation = Quaternion.Euler(0f, 0f, this.curRot + (this.stuckToSpinner ? (this.spinner.rotation.eulerAngles.z - this.spinnerRotOffset) : 0f));
	}

	// Token: 0x0600000B RID: 11 RVA: 0x000022C8 File Offset: 0x000004C8
	private void SetRotLimits()
	{
		int num = 12;
		float num2 = 0f;
		float num3 = 6.2831855f / (float)num;
		float d = 0.7f;
		int num4 = 0;
		Vector2 a = Vector2.zero;
		for (int i = 0; i < num; i++)
		{
			Vector2 b = new Vector2(Mathf.Cos(num2), Mathf.Sin(num2)) * d;
			if (Physics2D.OverlapPoint(base.transform.position + b, -257))
			{
				a += b;
				num4++;
			}
			num2 += num3;
		}
		Vector2 normalized = (a / (float)num4).normalized;
		if (normalized == Vector2.zero)
		{
			this.fullRotationMode = true;
			return;
		}
		this.fullRotationMode = false;
		float num5 = Mathf.Atan2(normalized.y, normalized.x) * 57.29578f;
		this.lowerBoundAngle = num5 + 105f;
		this.upperBoundAngle = num5 + 255f;
		this.curRot = num5 + 180f;
		base.transform.rotation = Quaternion.Euler(0f, 0f, this.curRot);
	}

	// Token: 0x0600000C RID: 12 RVA: 0x000023F4 File Offset: 0x000005F4
	private void ShowArrow()
	{
		if (!this.arrowEnabled)
		{
			return;
		}
		this.SetRotLimits();
		this.clockwise = true;
		base.gameObject.SetActive(true);
		if (SpinTracker.instance.stuckToSpinner)
		{
			this.stuckToSpinner = true;
			this.spinner = SpinTracker.instance.spinner;
			this.spinnerRotOffset = this.spinner.rotation.eulerAngles.z;
			return;
		}
		this.stuckToSpinner = false;
	}

	// Token: 0x0600000D RID: 13 RVA: 0x0000246C File Offset: 0x0000066C
	private void DisableArrow()
	{
		this.arrowEnabled = false;
		base.gameObject.SetActive(false);
	}

	// Token: 0x04000005 RID: 5
	public float spinSpeed = 10f;

	// Token: 0x04000006 RID: 6
	public GameObject dummyArrow;

	// Token: 0x04000007 RID: 7
	private float curRot;

	// Token: 0x04000008 RID: 8
	private float lowerBoundAngle;

	// Token: 0x04000009 RID: 9
	private float upperBoundAngle = 180f;

	// Token: 0x0400000A RID: 10
	private bool clockwise;

	// Token: 0x0400000B RID: 11
	private bool fullRotationMode;

	// Token: 0x0400000C RID: 12
	private Transform arrowTransform;

	// Token: 0x0400000D RID: 13
	private Transform spinner;

	// Token: 0x0400000E RID: 14
	private bool stuckToSpinner;

	// Token: 0x0400000F RID: 15
	private float spinnerRotOffset;

	// Token: 0x04000010 RID: 16
	private bool arrowEnabled = true;
}