示例#1
0
    // Start is called before the first frame update
    void Start()
    {
        agent       = GetComponent <NavMeshAgent>();
        agent.speed = stats.Speed;

        childAtkRadiusObject = GetComponentInChildren <ARO>().gameObject;

        Rigidbody rb = GetComponent <Rigidbody>();

        rb.isKinematic = true;
        rb.useGravity  = false;

        HP = stats.MaxHealth;

        cooldown  = false;
        pursue    = false;
        hasTarget = false;

        target       = null;
        MotherTarget = null;

        unitDead = new UnitEvent();
        unitDead.AddListener(AIController.Instance.UnRegisterUnit);
        AIController.Instance.RegisterUnit(this);
    }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     trigger.AddListener(() =>
     {
         StopAllCoroutines();
         StartCoroutine(setunset());
     });
 }
示例#3
0
    State currentState;                 //Records if map is emphasized or not emphsized


    void Start()
    {
        group        = GetComponent <CanvasGroup>();
        canvasRect   = GetComponent <RectTransform>();
        currentState = State.neutral; //Initial state is neutral

        Initialize.AddListener(highlight);
        cancelTutorialEvent.AddListener(cancelTutorial);
    }
示例#4
0
 // Start is called before the first frame update
 void Start()
 {
     for (int i = 0; i < boards.Count; i++)
     {
         var j = i;
         boards[i].AddListener(_ => setboard(j));
     }
     holeChoosen.AddListener(ClearBoard);
     dialogue_proceed.AddListener(_ => ClearBoard(-1));
 }
示例#5
0
    void Start()
    {
        ballSpawnPosition = transform.position;

        ball = Instantiate(golfBallPrefab, ballSpawnPosition, Quaternion.identity);
        ball.transform.parent = transform;
        ball.SetActive(false);
        StartCoroutine(spawner());

        holechoosen.AddListener(_ => wait_time   = 3.25f);
        increase_dur.AddListener(() => wait_time = 15);
    }
示例#6
0
 // Start is called before the first frame update
 void Start()
 {
     boardIn.AddListener(() => StartCoroutine(go_up()));
     dialogueIn.AddListener(() => StartCoroutine(go_down()));
 }
示例#7
0
 // Start is called before the first frame update
 void Start()
 {
     unit.AddListener(() => Application.Quit());
 }
示例#8
0
 // Start is called before the first frame update
 void Start()
 {
     rect = GetComponent <RectTransform>();
     goneOverBounds.AddListener(RecreateText);
 }
示例#9
0
 // Start is called before the first frame update
 void Start()
 {
     trigger.AddListener(listener.Invoke);
 }
示例#10
0
 // Start is called before the first frame update
 void Start()
 {
     caller.AddListener(listener.Invoke);
 }
示例#11
0
 public void AddStopListener(System.Action listener)
 {
     stop.AddListener(listener);
 }
示例#12
0
 public void AddStartListener(System.Action listener)
 {
     start.AddListener(listener);
 }