示例#1
0
 // Use this for initialization
 void Start()
 {
     //Angelを取得
     this.angel = GameObject.Find("Angel");
     //AngelControllerを取得
     this.angelController = angel.GetComponent <AngelController>();
 }
    // Use this for initialization
    void Start()
    {
        //Angelのオブジェクトを取得
        this.angel = GameObject.Find("Angel");
        //AngelControllerを取得
        this.angelController = angel.GetComponent <AngelController>();


        //Angelとカメラの位置(z座標)の差を求める
        this.difference = angel.transform.position.z - this.transform.position.z;
    }
示例#3
0
 void OnTriggerEnter2D(Collider2D other)
 {
     if (other.gameObject.tag == "Minion" && target == null)
     {
         target = other.gameObject;
         MC     = other.gameObject.GetComponent <MinionController>();
         Targeting();
     }
     if (other.gameObject.tag == "Angel" && target == null)
     {
         target = other.gameObject;
         AC     = other.gameObject.GetComponent <AngelController>();
         Targeting();
     }
 }
示例#4
0
    private void Awake()
    {
        fc = GameObject.Find("Fairy").GetComponent <FairyController>();
        ac = GameObject.Find("Angel").GetComponent <AngelController>();
        dc = GameObject.Find("Demonic").GetComponent <DemonicController>();

        uiCanvas = GameObject.Find("UI Canvas for enemy").GetComponent <Canvas>();

        meetEnemy        = false;
        onceForCoroutine = false;
        SearchCoroutine  = null;

        baseDirection = new Vector3(0f, 0f, 1f) - new Vector3(0f, 0f, 0f);
        baseDirection.Normalize();
    }