void Start() { this.SC = GameObject.FindGameObjectWithTag("ScenesController").GetComponent <ScenesController> (); this.graphicManipulators = GameObject.FindGameObjectWithTag("GraphicManipulators"); this.BeginModel = GameObject.FindGameObjectWithTag("Game").GetComponentInChildren <BeginModel> (); this.GPC = GameObject.Find("GamePlayController").GetComponent <GamePlayController> (); }
private void MakeInstace() { if (instace == null) { instace = this; } }
public void _makeInstance() { if (instance == null) { instance = this; } }
void MakeInstance() { if (instance == null) { instance = this; } }
void MakeInstance() { if (ornek == null) { ornek = this; } }
void Awake() { if (instance == null) { instance = this; } }
void CreateInstance() { if (instance == null) { instance = this; } }
void makeinstance() { if (instance == null) { instance = this; } }
private void makeInstance() { if (instance == null) { instance = this; } }
private void Start() { gamePlayController = GameObject.FindObjectOfType <GamePlayController>(); drunkTimer = 0; AddictionIntervalTimer = 0; RightLevelBoundary = GameObject.FindGameObjectWithTag("Endpoint").transform.position.x; }
void MakeIntsance() { if (intsance == null) { intsance = this; } }
/// <summary> /// When champion created Champion and teamID passed /// </summary> /// <param name="_champion"></param> /// <param name="_teamID"></param> public void Init(Champion _champion, int _teamID) { champion = _champion; teamID = _teamID; //store scripts map = GameObject.Find("Scripts").GetComponent <Map>(); aIopponent = GameObject.Find("Scripts").GetComponent <AIopponent>(); gamePlayController = GameObject.Find("Scripts").GetComponent <GamePlayController>(); worldCanvasController = GameObject.Find("Scripts").GetComponent <WorldCanvasController>(); navMeshAgent = this.GetComponent <NavMeshAgent>(); championAnimation = this.GetComponent <ChampionAnimation>(); //disable agent navMeshAgent.enabled = false; //set stats maxHealth = champion.health; currentHealth = champion.health; currentDamage = champion.damage; worldCanvasController.AddHealthBar(this.gameObject); effects = new List <Effect>(); }
void MakeInstance() { if (instance == null) { instance = this; } //DontDestroyOnLoad (); }
void OnEnable() { isGameEnded = false; playerCarControl.gameEnded += onGameEnd; coinControl.isONMagetPower = false; Static = this; Shader.SetGlobalVector("_Offset", curve); }
void MakeInstance() { //Setting up the varable so i can use this class perfectly with just GamePlayController.instance when i am in other classes if (instance == null) { instance = this; } }
// Start is called before the first frame update void Start() { //shootPoint = this.transform.Find("shootpoint").gameObject; enemys = new GameObject[100]; agent = GetComponent <NavMeshAgent>(); animator = GetComponent <Animator>(); gamePlayController = GameObject.Find("Scripts").GetComponent <GamePlayController>(); }
// Use this for initialization void Awake() { if (instance == null) { instance = this; } FirstAction = 0; }
void Start() { gpc = FindObjectOfType <GamePlayController>(); player = gpc.GetPlayer(); floorPrefab = gpc.GetFloorPrefap(); superFloorPrefab = gpc.GetSuperFloorPrefap(); bonusTextPrefab = gpc.GetBonusPrefap(); }
protected override void LoadContent() { ContentManager content = Game.Content; //Loads the gameoptions from last time GameOptions = Serializing.LoadGameOptions(); ControllerViewManager = new ControllerViewManager(Game.GraphicsDevice, content); //Adds the sound controller ControllerViewManager.AddController(soundController); //Loads and add the fonts to the a list so controllers easily can reach this just by the name of the string fonts.Add("Impact", content.Load <SpriteFont>("Fonts/Impact")); fonts.Add("Impact.large", content.Load <SpriteFont>("Fonts/Impact.large")); //Loads the player controllers from file List <Player> players = Serializing.LoadPlayerControllers(); // Init each player by creating a gamepadcontroller foreach player foreach (Player player in players) { GamepadController gamepad = new GamepadController(this, player); gamePads.Add(gamepad); ControllerViewManager.AddController(gamepad); } //Creates the controller for the cursor cursorsController = new CursorController(this); ControllerViewManager.AddController(cursorsController); //Adds the popupmenu to the controllers stack popupMenuController = new OverlayMenuController(this); ControllerViewManager.AddController(popupMenuController); //if startgameplay is true then the game goes straight in to game play if (Constants.StartGameplay) { //Set the right state gameStateManager.CurrentState = GameState.GamePlay; var chars = Serializing.LoadCharacters(); var maps = Serializing.LoadMaps(); gamePads[0].PlayerModel.SelectedCharacter = chars[1]; gamePads[0].PlayerModel.CharacterIndex = 0; gamePads[1].PlayerModel.SelectedCharacter = chars[2]; gamePads[1].PlayerModel.CharacterIndex = 2; GamePlayController game = new GamePlayController(this, maps[1]); ControllerViewManager.AddController(game); } else { gameStateManager.CurrentState = GameState.StartScreen; this.menu = new MenuController(this); ControllerViewManager.AddController(menu); } }
void Start() { gamePlayReadyStartAnimator = GameObject.FindWithTag("GamePlayController").GetComponent <GamePlayReadyStartAnimator>(); gameController = GameObject.FindWithTag("GamePlayController").GetComponent <GamePlayController>(); modifier = 1f - (float)PlayerPrefs.GetInt("coatLevel") / maxCoatModifierLevel; modifier *= 1f + (((float)PlayerPrefs.GetInt("neighborhoodChosenFromMap") * 1.1f) / maxCoatModifierLevel); modifier *= 0.5f; freezeTimer.value = 0; }
/// <summary> /// 初始化Champion /// </summary> /// <param name="_champion"></param> public void Init(Champion _champion) { champion = _champion; map = GameObject.Find("Scripts").GetComponent <Map>(); gamePlayController = GameObject.Find("Scripts").GetComponent <GamePlayController>(); targetState = GetComponent <TargetState>(); //set stats targetState.prefab = _champion.prefab; }
void MakeInstance() { if (instance == null) { instance = this; } else if (instance != null) { Destroy(gameObject); } }
private void Awake() { if (Instance == null) { Instance = this; } else { Destroy(gameObject); } }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
void Start() { gameControllerObject = GameObject.FindGameObjectWithTag("GameController"); if (gameControllerObject != null) { gameController = gameControllerObject.GetComponent <GamePlayController>(); } if (gameController == null) { Debug.Log("Cannot find game controller object for score updation !"); } }
public override void Init(IModule module) { base.Init(module); viewScript = InstantiateView <GamePlayView>("GamePlay/Prefabs/GamePlayView"); control = new GamePlayController(); control.view = (GamePlayView)viewScript; control.Start(); RegisterController(control); RegisterView(viewScript); }
void Start() { Instance = this; mapGenerator = MapGenerator.Instance; if (mapGenerator == null) { Debug.Log("ITS ALL YOUR FAULT"); } else { StartCoroutine(StartGamePlay()); } }
// Start is called before the first frame update void Awake() { gameplay = GameObject.Find("GameplayController").GetComponent <GamePlayController>(); gameplay.SetScore(0); gameplay.SetLifeScore(2); meteoroTocado = true; estrellaDoblePuntos = false; invensibilidad = false; score = 0; lifeScore = 2; cont1 = 0; cont2 = 0; }
protected virtual void FindGamePlayController() { _gamePlayElementController = gameObject.GetComponent <GamePlayController>(); if (_gamePlayElementController == null) { _gamePlayElementController = gameObject.GetComponentInParent <GamePlayController>(); } if (_gamePlayElementController == null) { LoggingManager.AddErrorToLog("Didt found gamePlay Element Controller"); } _gamePlayElementController.initStaticData += InitStaticData; InitStaticData(); }
private void Awake() { if (instance == null) { instance = this; } scoreTxt.text = score.ToString(); songNameTxt.text = GameInfo.songName; //mask.GetComponent<Animator>().SetBool("Start", true); }