Exemplo n.º 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);
 }
Exemplo n.º 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);
     }
 }
Exemplo n.º 3
0
    public void SetWorkerCollision(VestState vestState)
    {
        switch (vestState)
        {
        case VestState.WithoutVest:
            colliderRefUpdate.m_ICollide = workerWithoutVestCollide;
            break;

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