Exemple #1
0
    public void SetState(KobotoState newState)
    {
        if (newState != currentState)
        {
            currentState = newState;
            stateTime    = 0f;
        }

        switch (currentState)
        {
        case KobotoState.Alive:
            rb.isKinematic = false;
            ParentToTransform(defaultParent);
            break;

        case KobotoState.Asleep:
            rb.isKinematic = false;

            break;

        case KobotoState.Rescued:
            rb.isKinematic = true;
            break;
        }
        foreach (var attachment in currentAttachments.Values)
        {
            attachment.KobotoEnteredState(this, newState);
        }
    }
 public override void KobotoEnteredState(Koboto koboto, KobotoState state)
 {
     base.KobotoEnteredState(koboto, state);
     if (state != KobotoState.Alive)
     {
         dustVFX.SetActive(false);
         overGround = false;
     }
 }
Exemple #3
0
 public virtual void KobotoEnteredState(Koboto koboto, KobotoState state)
 {
 }