Ejemplo n.º 1
0
 // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
 override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
 {
     parent            = animator.transform.parent;
     ba                = parent.GetComponent <Boss_Attack>();
     player            = GameObject.FindGameObjectWithTag("Player");
     playerAttackPoint = GameObject.FindGameObjectWithTag("PlayerAttackPoint").transform;
 }
Ejemplo n.º 2
0
    // Use this for initialization
    void Start()
    {
        EB_Sprite = GO_Billboard.GetComponent <BossBillboard>();

        CC_Movement = GetComponent <Boss_Movement>();
        CC_Attack   = GetComponent <Boss_Attack>();

        Boss_Movement.Target = PC;
    }
    // OnStateEnter is called when a transition starts and the state machine starts to evaluate this state
    override public void OnStateEnter(Animator animator, AnimatorStateInfo stateInfo, int layerIndex)
    {
        player     = GameObject.FindGameObjectWithTag("Player").transform;
        rb         = animator.GetComponent <Rigidbody2D>();
        boss       = animator.GetComponent <Boss>();
        bossAttack = animator.GetBehaviour <Boss_Attack>();

        for (int i = 0; i < boss.patrolPoints.Length; i++)
        {
            boss.patrolPoints[i] = GameObject.Find("Point (" + i + ")").GetComponent <Transform>();
        }
    }
Ejemplo n.º 4
0
    void Awake()
    {
        // instans = this;
        PhotonNetwork.Instantiate("newPlayer", Vector3.zero, Quaternion.identity, 0, null);

        spawnMgr = GameObject.Find("SpawnMgr").gameObject;
        BOSS     = GameObject.Find("Boss_position").transform.Find("BOSS").gameObject;
        boss_tr  = GameObject.Find("Boss_position").GetComponent <Transform>();

        spawnMgr.SetActive(false);
        BOSS.SetActive(false);

        bossAttack  = BOSS.GetComponent <Boss_Attack>();
        boss_Health = BOSS.GetComponent <Boss_Health>();
    }