// 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); }
// Start is called before the first frame update void Start() { trigger.AddListener(() => { StopAllCoroutines(); StartCoroutine(setunset()); }); }
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); }
// 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)); }
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); }
// Start is called before the first frame update void Start() { boardIn.AddListener(() => StartCoroutine(go_up())); dialogueIn.AddListener(() => StartCoroutine(go_down())); }
// Start is called before the first frame update void Start() { unit.AddListener(() => Application.Quit()); }
// Start is called before the first frame update void Start() { rect = GetComponent <RectTransform>(); goneOverBounds.AddListener(RecreateText); }
// Start is called before the first frame update void Start() { trigger.AddListener(listener.Invoke); }
// Start is called before the first frame update void Start() { caller.AddListener(listener.Invoke); }
public void AddStopListener(System.Action listener) { stop.AddListener(listener); }
public void AddStartListener(System.Action listener) { start.AddListener(listener); }