Example #1
0
 // Gets animator, camera and controls
 void Start()
 {
     joystic = GameObject.Find("JoysticBG").GetComponent <VirtualJoystic>();
     if (joystic == null)
     {
         Debug.LogError("404: joystic in PlayerCtrl");
     }
     arrow = GameObject.Find("Arrows").GetComponent <Arrow>();
     if (arrow == null)
     {
         Debug.LogError("404: arrow in PlayerCtrl");
     }
     b_atk = GameObject.Find("Atk").GetComponent <But_pressed>();
     if (b_atk == null)
     {
         Debug.LogError("404: b_atk in PlayerCtrl");
     }
     anim = GameObject.Find("Pollo").GetComponent <Animator>();
     if (anim == null)
     {
         Debug.LogError("404: anim in PlayerCtrl");
     }
     cm = GameObject.Find("Main Camera").GetComponent <CamMov>();
     if (cm == null)
     {
         Debug.LogError("404: cm in PlayerCtrl");
     }
 }
Example #2
0
    void Start()
    {
        rB = this.GetComponent <Rigidbody>();
        if (rB == null)
        {
            Debug.LogError("404: rB in PlayerCtrl");
        }
        anim = this.GetComponent <Animator>();
        if (anim == null)
        {
            Debug.LogError("404: anim in PlayerCtrl");
        }
        caps = this.GetComponent <CapsuleCollider>();
        if (caps == null)
        {
            Debug.LogError("404: caps in PlayerCtrl");
        }
        joystic = GameObject.Find("JoysticBG").GetComponent <VirtualJoystic>();
        if (rB == null)
        {
            Debug.LogError("404: joystic in PlayerCtrl");
        }
        bRun = GameObject.Find("ButRun").GetComponent <But_Action>();
        if (bRun == null)
        {
            Debug.LogError("404: bRun in PlayerCtrl");
        }

        walkSpd = 2f;
    }
Example #3
0
    void Start()
    {
        player = GameObject.FindGameObjectWithTag("Player");
        if (player == null)
        {
            Debug.LogError("404: Player in ColliderBeh");
        }

        ctrl = GameObject.Find("JoysticBG").GetComponent <VirtualJoystic>();
        if (ctrl == null)
        {
            Debug.LogError("404: ctrl in ColliderBeh");
        }

        anim = player.GetComponent <Animator>();
        if (anim == null)
        {
            Debug.LogError("404: anim in ColliderBeh");
        }

        pScript = player.GetComponent <PlayerAnimKitchen>();

        bAction = GameObject.Find("ButAction").GetComponent <But_Action>();
        if (bAction == null)
        {
            Debug.LogError("404: ButtonAction in CollidersBeh");
        }

        canDo = true;
    }