public void Initialize(Player targetPlayer, FragmentController fragmentController) { this.targetPlayer = targetPlayer; FragmentController = fragmentController; transform.position = targetPlayer.Position + new Vector3(UnityEngine.Random.Range(-5, 5), 0, UnityEngine.Random.Range(-5, 5)); PathFindingAgent.Initialize(this); }
protected override void OnInitialize() { FragmentController fragmentController = MainController.GetControllerOfType(typeof(FragmentController)) as FragmentController; FriendlyController friendlyController = MainController.GetControllerOfType(typeof(FriendlyController)) as FriendlyController; Player.Initialize(fragmentController, friendlyController); }
protected override void OnInitialize() { Player player = (MainController.GetControllerOfType(typeof(PlayerController)) as PlayerController).Player; FragmentController fragmentController = MainController.GetControllerOfType(typeof(FragmentController)) as FragmentController; foreach (var robot in robots) { robot.Initialize(player, fragmentController); } }
private IEnumerator Initialize() { if (isFake) { yield break; } fc = transform.root.GetComponent <FragmentController>(); health = fc.fragmentHealth; base.hitIndication = false; }
protected override void OnInitialize() { for (int i = whisps.Count - 1; i >= 0; i--) { if (whisps[0].gameObject.activeSelf == false) { whisps.RemoveAt(i); } } FragmentController fragmentController = MainController.GetControllerOfType(typeof(FragmentController)) as FragmentController; foreach (Whisp whisp in whisps) { whisp.Initialize(fragmentController); } }
public void DoPuzzleSetup() { base.DoSetup(); forceField = Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/Puzzles/Forcefield")); forceField.transform.parent = this.transform; forceField.transform.position = Vector3.zero; GameObject fragment_case = Instantiate <GameObject>(Resources.Load <GameObject>("Prefabs/Puzzles/FragmentCase")); fragment_case.transform.parent = this.transform; fragment_case.transform.position = Vector3.zero; fragment_case.GetComponent <CircleCollider2D>().isTrigger = true; fragmentCase = fragment_case.GetComponent <FragmentCase>(); fragment = fragmentCase.getFragment(); fragment.currentState = FragmentController.states.IDLE; Debug.Log("Fragment : " + fragment.name); }
public void Initialize(FragmentController fragmentController, FriendlyController friendlyController) { pathfindingAgent.Initialize(this); this.fragmentController = fragmentController; this.friendlyController = friendlyController; }
public void Initialize(FragmentController fragmentController) { FragmentController = fragmentController; //StateMachine = new StateMachine<Whisp>(); pathfindingAgent.Initialize(this); }
private IEnumerator DeleteFragments(FragmentController fragment) { yield return(new WaitForSeconds(1.5f)); Destroy(fragment.gameObject); }