public void SetBonus(CanvasManager.Item value) { activeItems.Add(new Item(value.Duration, value.Influence)); activeItems[activeItems.Count - 1].Go = (GameObject)Instantiate(value.ItemPrefab, this.transform.position, this.transform.rotation); activeItems[activeItems.Count - 1].Go.transform.SetParent(this.transform); bonus += value.Influence; }
void Awake() { gps = GameObject.FindGameObjectWithTag("Gps").GetComponent<GpsWithoutUi>(); cm = GameObject.FindGameObjectWithTag("Ui").GetComponent<CanvasManager>(); PositionUtilities.Init(); }
// Update is called once per frame void Update () { if (timerEnabled) { totalTime+=Time.deltaTime; } if (canvas == null) { canvas = GameObject.FindObjectOfType<CanvasManager>(); } else { canvas.timeText.text = TimeToStringFormat(totalTime); } }
void Awake() { if (instance == null) { instance = this; } else { Destroy(gameObject); } }
public ListView() { column_layout = new Pango.Layout(PangoContext); CanFocus = true; selection_proxy.Changed += delegate { InvalidateList(); }; HasTooltip = true; QueryTooltip += OnQueryTooltip; DirectionChanged += (o, a) => SetDirection(); manager = new CanvasManager(this); OnStyleUpdated(); }
void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(this); } else if (instance != this) { Destroy(this.gameObject); } }
private void Awake() { /*if (Instance != this) * { * Destroy(gameObject); * }*/ cm = CanvasManager.Instance; pm = Player_movement.Instance; sm = SpawnManager.Instance; posXMax = transform.position.x; can = true; }
void Awake() { if (main == null) { main = this; } else { Debug.LogError("Deux CanvasManager sur la scène !"); Destroy(this); } }
public IEnumerator Connecting() { Debug.Log("开始动画"); Submit.btn.interactable = false; TimeCountDown.instance.BreakCountDown(); connectLine.ShowAll(); SoundManager.instance.playConnecting(); yield return(new WaitForSeconds(6)); SoundManager.instance.StopBGM(); CanvasManager.startConversation(); }
public static void Refresh() { if (!instance) { instance = FindObjectOfType <CanvasManager>(); } instance.layers = instance.canvas.GetComponentsInChildren <CanvasLayer>(true); for (int i = 0; i < instance.layers.Length; i++) { instance.layers[i].gameObject.SetActive(Layer == instance.layers[i].name); } }
private void Awake() { // if the singleton hasn't been initialized yet if (instance != null && instance != this) { Destroy(this.gameObject); return;//Avoid doing anything else } instance = this; DontDestroyOnLoad(this.gameObject); }
private void Awake() { if (Instance == null) { Instance = this; //DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
public ResultState(GameManager gameManagerRef, Kroken player) { this.gameManagerRef = gameManagerRef; // gameManagerRef.canvasManagerRef.ToggleVictoryPanel(true, player.GetName(), player.GetColor()); CanvasManager.ActivateWinMenu(player); gameManagerRef.audioManagerRef.StopMusicTrack(); PlayerManager.ClearPlayers(); EnemyManager.StopSpawning(); EnemyManager.ResetSpawner(); }
private void Awake() { if (Instance != null && Instance != this) { transform.parent = null; Destroy(this.gameObject); } else { Instance = this; } }
public void Start() { colliderTwoD = GetComponent <Collider2D>(); movement = GetComponent <Movement>(); canMan = optionsMenuController.GetComponent <CanvasManager>(); pokeData = new PokemonData(); isFinished = false; foreach (string names in pokemonList.pokemon) { actualPokemonList.Add(new Pokemon(names)); } }
void Awake() { DontDestroyOnLoad(this.gameObject); if (main == null) { main = this; } else { Destroy(gameObject); } }
private void MakeSingleton() { if (_instance != null) { DestroyImmediate(gameObject); } else { _instance = this; DontDestroyOnLoad(gameObject); } }
public void Declaration(anAI ToFollow) { canvasManager = CanvasManager.Instance; transform.parent = canvasManager.accrocheAIstate; FondInterrogation.gameObject.SetActive(false); InterrogationAmount.fillAmount = 0; InterrogationAmount.gameObject.SetActive(false); Pursuit.gameObject.SetActive(false); myFighter = ToFollow; GetComponent<aFollowingUI>().theRenderer = ToFollow.GetComponent<Renderer>(); }
void Awake() { Instance = this; lastLevel = Util.GetLastLevelPlayed(); DOTween.Init(); SetButtons(); //ButtonLogic (); adjustUiForScreenSize(); }
/// <summary> /// Awake method that will run before Start() /// </summary> void Awake() { // An if that doesn't destroy the gameObject when loading a new scene if (_instance == null) { _instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } }
private void Awake() { Application.targetFrameRate = 60; if (inst == null) { inst = this; } else { Destroy(gameObject); } }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } showingCanvasIdx = -1; }
// Use this for initialization void Start() { Debug.Log("btn start"); _button = GetComponent <Button>(); _canvasManager = CanvasManager.GetComponent <CanvasManager>(); _button.onClick.AddListener(() => { Debug.Log("btn click"); _canvasManager.NextCanvas(); }); }
protected override void OnExperimentSetup() { CanvasManager.Show(); goalManager = GoalManager.Instance; storesManager = StoresManager.Instance; _player = PlayerController.Instance; //setup store types for (var i = 0; i < Settings.StoreTypes.Length; i++) { storesManager.Objects [i].SetType(Settings.StoreTypes [i]); } goalManager.HideAll(); }
protected override void OnExecute() { if (animationName != null && canvasTipology != null && prefab.IsExist(out var pagePrefab)) { Transform pageObj = CanvasManager.GetWidget(pagePrefab.name, canvasTipology.value); if (pageObj != null && pageObj.TryGetComponent <GenericPage>(out GenericPage page)) { page.StartAnimation(animationName.value); } } EndAction(); }
private void Awake() { if (Instance != null) { Destroy(gameObject); } else { print("Instance set"); Instance = this; DontDestroyOnLoad(gameObject); } }
private void Awake() { if (instance == null) { instance = this; DontDestroyOnLoad(gameObject); } else { Destroy(gameObject); } mainCanvasManager = GameObject.Find("MainCanvas").GetComponent <CanvasManager>(); }
private void Awake() { // if the singleton hasn't been initialized yet if (instance != null && instance != this) { Destroy(this.gameObject); return;//Avoid doing anything else } instance = this; Init(); DontDestroyOnLoad(this.gameObject); }
private void updateAmount() { if (this.gems != null) { CanvasManager.ShowCanvas(itemPrice.GetComponent <CanvasGroup>()); itemPrice.GetComponentInChildren <Text>().text = "" + this.gems.Count; } else { CanvasManager.HideCanvas(itemPrice.GetComponent <CanvasGroup>()); itemPrice.GetComponentInChildren <Text>().text = ""; } }
private void Awake() { if (_instance == null) { _instance = this; } else if (_instance != this) { Destroy(gameObject); } DontDestroyOnLoad(gameObject); }
// Start is called before the first frame update void Start() { schedule = GameObject.Find("ScheduleManager"); if (schedule) { ScheduleManager data = schedule.GetComponent <ScheduleManager>(); CanvasManager canvasManager = canvas.GetComponent <CanvasManager>(); if (data.classSchedule.Count != 0) { //canvasManager.updateClassScheduled(data.classSchedule); } } }
public bool CheckIfWon() { if (AlreadyWon) { return(true); } if (count == 0) { object[] param = new object[1]; param[0] = CurrentLevel; CanvasManager.Push(GlobalInfor.WinMenu, param); AlreadyWon = true; GameEventSystem.current.TimeControl(1); } return(count == 0); }
void Start() { if (gameState == null) { gameState = new SplashScreenState(this); } audioManagerRef = AudioManager.GetInstance(); canvasManagerRef = CanvasManager.GetInstance(); cam = Camera.main; loadManagerRef = new LoadManager(); }
// Use this for initialization void Start() { // First toggle in array _toggleCurrent = ToggleArray[0]; // Next toggle in array _toggleNext = ToggleArray[System.Array.IndexOf(ToggleArray, _toggleCurrent) + 1]; _toggleLast = ToggleArray[ToggleArray.Length - 1]; _ready = "true"; _timeWait = 2.0f; _canvasManager = CanvasManager.GetComponent <CanvasManager>(); Debug.Log("canvasexercise"); }
private void ProcessHit(DamageDealer damageDealer) { SetValue.PlayerHealth -= damageDealer.GetDamage(); CanvasManager.UpdateHealthUI(); damageDealer.Hit(); if (SetValue.PlayerHealth <= 0) { AudioSource.PlayClipAtPoint(_deathClip, Camera.main.transform.position, _deathVolume); Invoke("GameOverDelay", _gameOverDelay); gameObject.SetActive(false); } }
protected virtual void Init() { canvas = Canvas.FindObjectOfType<Canvas>(); canvasManager = canvas.GetComponent<CanvasManager>(); //WorldInterface.CreateGameWorld(worldSize); worldInterface = WorldInterface.CreateWorldInterface(worldSize); pointObjectManager = PointObjectManager.CreatePointObjectManager(); actionManager = gameObject.AddComponent<ActionManager>(); workManager = gameObject.AddComponent<WorkManager>(); pathFinder = new Pathfinder(); if (buildStartArea) { BuildStartArea(); } }