// Use this for initialization void Start () { viewer = GameObject.FindObjectOfType<BodyView>().GetComponent<BodyView>(); GetComponent<Collider>().isTrigger = true; //print(viewer); }
public override void OnEnterWithEvent(PlayerController fsm) { fsm.blockMovement.Velocity = Vector2.zero; body = fsm.GetComponentInChildren <BodyView>(); halo = fsm.GetComponentInChildren <HaloView>(); player = fsm; player.StartCoroutine(stateCor()); }
public Body(BodyView view, Vector2 position, DirectionSnake direction) { View = view; IsPause = false; Position = position; Direction = NextDirection = direction; NextPosition = GetNextPosition(); }
public Body(BodyView view, Body target) { View = view; _target = target; IsPause = true; Position = target.Position; Direction = target.Direction; NextDirection = target.NextDirection; NextPosition = target.NextPosition; }
public void SetupBodyHUD(BodyView bodyView, Faction faction) { switch (faction) { case Faction.USER: userBodyHUDPoint = bodyView.HUDPoint; break; case Faction.ENEMY: break; } }
private void OnStateChanged(int value) { Log.Debug($"OnStateChanged {value}"); if (value == 0) { BodyView.SetActive(false); } else { if (BodyView.activeSelf == false) { BodyView.SetActive(true); } } if (value == 1) { GetComponent <AnimatorComponent>().Play(MotionType.Idle); } if (value == 2) { GetComponent <AnimatorComponent>().Play(MotionType.Run); } }
// Use this for initialization void Start() { bodyView = this.GetComponent <BodyView>(); }