public IArmState GetNextState(ArmComponent arg_arm) { if (m_finished) { arg_arm.m_isActive = false; return(new ArmStandByState()); } return(null); }
public void OnUpdate(ArmComponent arg_arm) { arg_arm.m_currentLength = arg_arm.m_lengthBuf.Pop(); if (arg_arm.m_lengthBuf.Count <= 0) { m_finished = true; } }
private bool IsCollided(ArmComponent arg_arm) { Vector2 forward = (arg_arm.m_targetPosition - (Vector2)arg_arm.m_transform.position).normalized; if (Physics2D.Raycast(arg_arm.GetTopPosition(), forward, m_increase, 1 << LayerMask.NameToLayer("Ground"))) { return(true); } return(false); }
public IArmState GetNextState(ArmComponent arg_arm) { if (m_isCancelled) { return(new ArmShortenState()); } if (m_isFinished) { return(new ArmFreezeState()); } return(null); }
public override void OnGraspedStay(PlayerComponent arg_player) { #if DEVELOP Debug.Log("Grasped : Update"); #endif ArmComponent arm = arg_player.Arm; if (arm.m_lengthBuf.Count > 0) { arm.m_transform.position = m_transform.position + (m_direction * arm.m_lengthBuf.Peek()); } else { arm.m_transform.position = m_transform.position; arg_player.gameObject.transform.position = arm.m_transform.position = transform.position; } arg_player.m_rigidbody.velocity = Vector2.zero; }
public void OnEnter(ArmComponent arg_arm) { m_finished = false; }
public void OnExit(ArmComponent arg_arm) { arg_arm.m_owner.m_inputHandle.m_reach = false; }
public void OnEnter(ArmComponent arg_arm) { arg_arm.m_shorten = false; }
public void OnExit(ArmComponent arg_arm) { }
public void OnUpdate(ArmComponent arg_arm) { }
public void OnExit(ArmComponent arg_arm) { arg_arm.m_owner.Hand.CallResultArmLengthend(m_isFinished); }
public void OnEnter(ArmComponent arg_arm) { m_isFinished = false; m_isCancelled = false; }
public void OnEnter(ArmComponent arg_arm) { arg_arm.m_owner.Hand.m_graspingItem.OnGraspedEnter(arg_arm.m_owner); }