public override void OnExit(AriesEntity entity) { Rigidbody2D rigid = entity.GetAgent().GetComponent <Rigidbody2D>(); Animator animator = entity.GetAgent().GetComponent <Animator>(); AriesAnimBridge bridge = entity.GetAgent().GetComponent <AriesAnimBridge>(); rigid.gravityScale = m_enterGravityScale; animator.SetTrigger(bridge.dashRecoverTrigger); }
public AriesStateHurt(AriesEntity entity) : base(entity) { m_beHit = entity.GetAgent().GetComponent <AriesBeHit>(); m_ctrl = entity.GetAgent().GetComponent <AriesController>(); m_animBridge = entity.GetAgent().GetComponent <AriesAnimBridge>(); m_transform = entity.GetAgent().GetComponent <Transform>(); m_spriteRenderer = entity.GetAgent().GetComponent <SpriteRenderer>(); m_animator = entity.GetAgent().GetComponent <Animator>(); m_rigidBody = entity.GetAgent().GetComponent <Rigidbody2D>(); m_envDetector = entity.GetAgent().GetComponent <EnvironmentDetector>(); }
public override void OnEnter(AriesEntity entity, Telegram msg) { base.OnEnter(entity, msg); Rigidbody2D rigid = entity.GetAgent().GetComponent <Rigidbody2D>(); AriesDash dash = entity.GetAgent().GetComponent <AriesDash>(); Animator animator = entity.GetAgent().GetComponent <Animator>(); AriesAnimBridge bridge = entity.GetAgent().GetComponent <AriesAnimBridge>(); m_enterGravityScale = rigid.gravityScale; m_leftTime = dash.m_dashKeepTime; animator.SetTrigger(bridge.dashTrigger); }
public AriesStateGlobal(AriesEntity entity) : base(entity) { m_animator = entity.GetAgent().GetComponent <Animator>(); m_animBridge = entity.GetAgent().GetComponent <AriesAnimBridge>(); }