// Use this for initialization
 void Start()
 {
     npcclass = GetComponentInParent <npcClass>();
     if (GameObject.FindGameObjectsWithTag("megumin_player").Length != 0)
     {
         selectEnemySystem = GameObject.FindGameObjectsWithTag("megumin_player")[0].GetComponent <selectEnemySystemScript>(); //
     }
 }
 // Use this for initialization
 void Start()
 {
     rigid2d  = GetComponentInParent <Rigidbody2D>();
     npcclass = GetComponentInParent <npcClass>();
     if (GameObject.FindGameObjectsWithTag("megumin_player").Length != 0)
     {
         selectEnemySystem = GameObject.FindGameObjectsWithTag("megumin_player")[0].GetComponent <selectEnemySystemScript>(); //
     }
     npcSkeletonAnimation.state.Complete += State_Complete;
 }
    // Use this for initialization
    void OnEnable()
    {
        selectEnemySystemScript = GetComponentInParent <Transform>().GetComponentInParent <selectEnemySystemScript>();

        //Use this to Start
        float timeToComplete = selectEnemySystemScript.timeToComplete * selectEnemySystemScript.slowMotionTimeScale;

        StartCoroutine(RadialProgress(timeToComplete));
        imageRadial.fillAmount = 1;
    }
예제 #4
0
    void Start()
    {
        GetComponent <Collider2D>().enabled = false;
        lockDownSystem = GetComponent <selectEnemySystemScript>();
        //pm = GetComponents<playerMove>()[0];
        //GM = GetComponents<playerGhostMove>()[0];
        // SP  = GetComponent<SpriteRenderer>();


        //GM.enabled = true;
        //GetComponent<Rigidbody2D>().gravityScale = 0;

        incontorlObj = lockDownSystem.targetGameObj;
        //transform.position = incontorlObj.transform.position;
        controlEnemyFunction(incontorlObj);
    }