예제 #1
0
 // Use this for initialization
 void Start()
 {
     m_jumpTrait   = target.GetComponent <TraitJump>();
     m_crouchTrait = target.GetComponent <TraitCrouch>();
     m_ledgeTrait  = target.GetComponent <TraitLedgeGrab>();
     m_controller  = target.GetComponent <EntityController>();
 }
예제 #2
0
    private void Start()
    {
        if (targetEntity == null)
        {
            throw new UnityException("Target Entity on TouchController must be set.");
        }

        m_move = targetEntity.GetComponent <TraitMove>();
        m_jump = targetEntity.GetComponent <TraitJump>();

        if (m_move == null)
        {
            throw new UnityException("Target Entity on TouchController must have a Trait Movement component.");
        }
        if (m_jump == null)
        {
            throw new UnityException("Target Entity on TouchController must have a Trait Jump component.");
        }
    }