コード例 #1
0
    private void Awake()
    {
        audio_s       = GetComponent <AudioSource>();
        fight_manager = GetComponent <UnitFightManager>();
        unit_wrapper  = transform.GetChild(0).gameObject;
        animator      = unit_wrapper.GetComponent <Animator>();
        IsDead        = false;

        if (CompareTag("Ally"))
        {
            isAlly    = true;
            direction = 1; // Направление движения
        }
    }
コード例 #2
0
 private void Start()
 {
     unit_manager  = GetComponent <UnitManager>();
     fight_manager = GetComponent <UnitFightManager>();
     StartCoroutine(ChangeLane(Random.Range(3f, 5f)));
 }