コード例 #1
0
 public virtual void PlayEffect(Animator animator, Rigidbody rb, VestState vestState)
 {
     if (vestState == VestState.WithoutVest)
     {
         noVestCollidingEffect.PlayEffect(animator, rb);
     }
     //else
     //withVestCollidingEffect.PlayEffect(animator, rb);
 }
コード例 #2
0
 public override void PlayEffect(Animator animator, Rigidbody rb, VestState vestState)
 {
     if (vestState == VestState.WithoutVest)
     {
         noVestCollidingEffect.PlayEffect(animator, rb);
     }
     else
     {
         Vector3 inLaneForce = (rb.transform.position - transform.position).normalized * tileConfig.keepInLaneForce;
         rb.AddForce(inLaneForce, ForceMode.VelocityChange);
     }
 }
コード例 #3
0
ファイル: WorkerFSM.cs プロジェクト: AUEzzat/Overoll
    public void SetWorkerCollision(VestState vestState)
    {
        switch (vestState)
        {
        case VestState.WithoutVest:
            colliderRefUpdate.m_ICollide = workerWithoutVestCollide;
            break;

        case VestState.WithVest:
            colliderRefUpdate.m_ICollide = workerWithVestCollide;
            break;
        }
    }