Beispiel #1
0
    private void OnTriggerEnter2D(Collider2D other)
    {
        if (other.tag == "Enemy")
        {
            if (this.transform.position.x > other.transform.position.x)
            {
                // collider.GetComponent<Enemy> ().underAttack (true, 1, attackPower, 1f, 5.0f);
            }
            else
            {
                // collider.GetComponent<Enemy> ().underAttack (false, 1, attackPower, 1f, 5.0f);
            }
            TimeMachine stopTime = Instantiate(timeMachine);
            stopTime.timeStop(attackStopTime);

            GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraManage> ().camaraShockFor(attackStopTime);

            // TimeMachine stopTime = new TimeMachine ();
            // Instantiate (stopTime);
        }
        breakSelf();
    }