public OctNode(double sidelength, Point3D p) { state = OctoState.F; _sideLength = sidelength; Point = p; Children = null; }
private void OnEnable() { myWander = GetComponent <Wander>(); myImage = GetComponent <Image>(); myCollider = GetComponent <BoxCollider2D>(); myState = OctoState.Down; UpdateImage(); EventManager.OnGameEvent += OnGameEvent; myHasCollidedWithCapturedOcto = false; myIsCaptruedOctoFreed = false; }
private void Update() { if (myWander.WalkSpeed < 0 && myState == OctoState.Up) { myState = OctoState.Down; UpdateImage(); } else if (myWander.WalkSpeed > 0 && myState == OctoState.Down) { myState = OctoState.Up; UpdateImage(); } }