private void Start() { Data = TurretData.instance; buildManager = BuildManager.instance; playerObtain = PlayerObtain.instance; hintManager = HintManager.instance; }
// Start is called before the first frame update void Start() { isAreaBomb = false; isColumnBomb = false; isRowBomb = false; //Use this for initialization board = FindObjectOfType <Board>(); findMatches = FindObjectOfType <FindMatches>(); hintManager = FindObjectOfType <HintManager>(); buttonManager = FindObjectOfType <ButtonManager>(); powerUpPoints = FindObjectOfType <PowerUpPoints>(); //Debug.Log(tigerButton); // targetX = (int)transform.position.x; // targetY = (int)transform.position.y; // row = targetY; //column = targetX; //previousColumn = column; // previousRow = row; }
private void OnTriggerEnter2D(Collider2D collision) { if (collision.tag == "Player") { hint = HintManager.ShowHint(canvas, 2); } }
void Start() { isColumnBomb = false; isRowBomb = false; isColourBomb = false; isAdjacentBomb = false; // Set the board component equal to the GameObject in the scene with the Board script attached board = GameObject.FindWithTag("Board").GetComponent <Board>(); //board = FindObjectOfType<Board>(); endGameManager = FindObjectOfType <EndGameManager>(); findMatches = FindObjectOfType <FindMatches>(); hintManager = FindObjectOfType <HintManager>(); #region OLD CODE // Set the targetX and targetY values as this GameObjects X and Y positions (cast into a int) //targetX = (int)transform.position.x; //targetY = (int)transform.position.y; // Set the row and column //column = targetX; //row = targetY; //previousRow = row; //previousColumn = column; #endregion }
protected override void DoExecute() { HintManager hintManager = LegacyLogic.Instance.WorldManager.HintManager; hintManager.TriggerHint(m_hint); FinishExecution(); }
private void OnTriggerEnter2D(Collider2D collision) { //判断是否是主角 //然后生成二号主角 //操作柄手交换 //改变世界状态 if (collision.gameObject.tag == "Player") { if (Master.killedEnemyNum == Master.totalEnemyNum) //当敌人都杀完后才会触发反向 { //collision.gameObject.SetActive(false); Master.AddReverseMainGuy(new Vector3(transform.position.x, transform.position.y + 5, 0)); Master.CalculateStageEnemy(); //计算阶段敌人数量 Master.EnemyFrozen(1f); //解封 //Master.Reverse(); //进入逆转状态 //暂时关闭碰撞器 //Destroy(gameObject); GetComponent <BoxCollider2D>().enabled = false; } else { HintManager.SetText("需要把敌人杀完才能进逆转门", 200); } } }
// Start is called before the first frame update void Start() { isColumnBomb = false; isRowBomb = false; isColourBomb = false; isAdjacentBomb = false; //board = FindObjectOfType<Board>(); board = GameObject.FindWithTag("Board").GetComponent <Board>(); findMatches = FindObjectOfType <FindMatches>(); hintManager = FindObjectOfType <HintManager>(); shake = FindObjectOfType <ScreenShake>(); endGameManager = FindObjectOfType <EndGameManager>(); explodable = GetComponent <Explodable>(); audioSource = gameObject.GetComponent <AudioSource>(); childObj = transform.Find("FollowMouse"); if (board.AllJuice == true) { childObj.gameObject.SetActive(true); } }
void Start() { endGameManager = FindObjectOfType <EndGameManager>(); hintManager = FindObjectOfType <HintManager>(); board = FindObjectOfType <Board>(); findMatches = FindObjectOfType <FindMatches>(); }
void Start() { scoreBoardManager = ScoreBoardManager.GetInstance(); scoreBoardManager.setScore(0); playerResponseManager = PlayerResponseManager.GetInstance(); playerResponseManager.UpdateSceneKeys(); playerResponseManager.attach(scoreBoardManager); initializeMenu(); initializeCommand(); initializeReceiver(); setReceiver(); setCommand(); transparentColor = new Color(1f, 1f, 1f, 0.5f); selectIndex = 0; prevIndex = selectIndex; InitializeText(); axisDirection = 0; axisDirectionPressed = 0; PlayerPrefs.SetInt("score", 0); TimeScript.timer = 100.0f; LifeScript.life = 3; HintManager hintManager = HintManager.GetInstance(); hintManager.TransitionTo(new HintNotUsed()); }
private void Awake() { if (instance == null) { instance = this; } myCachedTransform = this.transform; }
private void OnDestroy() { GameObject canvas = GameObject.Find("Canvas"); HintManager.ShowTips(canvas, 4); HintManager.ShowTips(canvas, 3); GameObject.Find("QTERoot").transform.Find("QTETrigger").gameObject.SetActive(true); }
// Start is called before the first frame update void Start() { hintsShown = 0; if (instance = null) { instance = this; } }
private void Start() { loadingCanvas = loadingScreen.GetComponent <LoadingScreen>().GetLoadingCanvas(); slider = loadingScreen.GetComponent <LoadingScreen>().GetSlider(); progressText = loadingScreen.GetComponent <LoadingScreen>().GetSliderPercentageText(); hint = loadingScreen.GetComponent <LoadingScreen>().GetHintText(); hints = hintManager.GetComponent <HintManager>(); OnSuchEvent += EventHandlingTransitionFinished; }
private void Start() { Hint = FindObjectOfType <HintManager>(); theBoard = FindObjectOfType <Board>(); theScore = FindObjectOfType <ScoreManager>(); previousHIGHscore = PlayerPrefs.GetInt("HighScore:" + theScore.thisLevel.ToString()); doOnce = 0; gameOver = false; }
private void Awake() { instance = this; stock = FindObjectOfType <Stock>(); waste = FindObjectOfType <Waste>(); animationQueueController = FindObjectOfType <AnimationQueueController>(); hintMoves = new Queue <HintMove>(); undoHolder = GameObject.FindGameObjectWithTag("UndoHolder").transform; dimScreen = FindObjectOfType <HintDimScreen>(); }
private void Start() { isColumnBomb = false; isRowBomb = false; isAdjacentBomb = false; hintManager = FindObjectOfType <HintManager>(); // works only if there is one board board = FindObjectOfType <Board>(); findMatches = FindObjectOfType <FindMatches>(); endGameManager = FindObjectOfType <EndGameManager>(); }
void Awake() { if (hintManager == null) { DontDestroyOnLoad(gameObject); hintManager = this; } else if (hintManager != this) { Destroy(gameObject); } }
public LoginForm() { InitializeComponent(); hintManager = new HintManager(); hintManager.SetPair(usernameTxtLogin, hintUsernameLogin); hintManager.SetPair(usernameTxtSign, hintUsernameSign); hintManager.SetPair(passwordTxtLogin, hintPasswordLogin); hintManager.SetPair(passwordTxtSign, hintPasswordSignup); hintManager.SetPair(conformTxtSign, hintConfirm); hintManager.SetPair(addressTxtSign, hintAddress); server = new Server(); }
void Start() { cubes = new List <GameObject>(); foreach (Transform childTransform in transform) { cubes.Add(childTransform.gameObject); } stickers = FindObjectsOfType <Sticker>().ToList(); hintManager = FindObjectOfType <HintManager>(); }
// private bool _flickering; // Start is called before the first frame update void Start() { cursor = new Texture2D(2, 2); cursor.LoadImage(File.ReadAllBytes("Assets/Sprites/mouseclick.png")); Min = 10f; Max = 40f; increasing = true; Strength = 25; lightSource = gameObject.transform.GetChild(0).gameObject.GetComponent <Light>(); playerIntro = GameObject.Find("Player").GetComponent <PlayerBasicIntro>(); torch = GameObject.Find("Torch"); hintManager = GameObject.Find("Hint").GetComponent <HintManager>(); }
void OnEnable() { menu = FindObjectOfType <Menu>(); hint = FindObjectOfType <HintManager>(); finder = FindObjectOfType <FindMatches>(); timer = FindObjectOfType <Timer>(); tiles = new GameObject[width, height]; menu.restartBtn.gameObject.SetActive(false); menu.gameOverTMP.text = "Game Over"; menu.gameOverTMP.gameObject.SetActive(false); CreateBoard(); score = 0; }
public static HintManager GetInstance() { lock (obj) { if (hintManager == null) { hintManager = new HintManager(); hintManager.TransitionTo(new HintNotUsed()); } } return(hintManager); }
// Start is called before the first frame update void Start() { blankSpaces = new bool[width, height]; breakableTiles = new BackgroundTile[width, height]; allDots = new GameObject[width, height]; findMatches = FindObjectOfType <FindMatches>(); hintManager = FindObjectOfType <HintManager>(); scoreManager = FindObjectOfType <ScoreManager>(); soundManager = FindObjectOfType <SoundManager>(); goalManager = FindObjectOfType <GoalManager>(); currentGameState = GameState.pause; Setup(); }
public void ApplyStatusEffects(ActionType type, float deltaTime, Character character = null, Limb targetLimb = null, Entity useTarget = null, Character user = null, Vector2?worldPosition = null, float applyOnUserFraction = 0.0f) { if (statusEffectLists == null) { return; } if (!statusEffectLists.TryGetValue(type, out List <StatusEffect> statusEffects)) { return; } bool broken = item.Condition <= 0.0f; bool reducesCondition = false; foreach (StatusEffect effect in statusEffects) { if (broken && !effect.AllowWhenBroken && effect.type != ActionType.OnBroken) { continue; } if (user != null) { effect.SetUser(user); } item.ApplyStatusEffect(effect, type, deltaTime, character, targetLimb, useTarget, isNetworkEvent: false, checkCondition: false, worldPosition); if (user != null && applyOnUserFraction > 0.0f && effect.HasTargetType(StatusEffect.TargetType.Character)) { effect.AfflictionMultiplier = applyOnUserFraction; item.ApplyStatusEffect(effect, type, deltaTime, user, targetLimb == null ? null : user.AnimController.GetLimb(targetLimb.type), useTarget, false, false, worldPosition); effect.AfflictionMultiplier = 1.0f; } reducesCondition |= effect.ReducesItemCondition(); } //if any of the effects reduce the item's condition, set the user for OnBroken effects as well if (reducesCondition && user != null && type != ActionType.OnBroken) { foreach (ItemComponent ic in item.Components) { if (ic.statusEffectLists == null || !ic.statusEffectLists.TryGetValue(ActionType.OnBroken, out List <StatusEffect> brokenEffects)) { continue; } brokenEffects.ForEach(e => e.SetUser(user)); } } #if CLIENT HintManager.OnStatusEffectApplied(this, type, character); #endif }
// Start is called before the first frame update void Start() { isColumnBomb = false; isRowBomb = false; isColorBomb = false; isAdjacentBomb = false; hintManager = FindObjectOfType <HintManager>(); board = GameObject.FindWithTag("Board").GetComponent <Board>(); //board = FindObjectOfType<Board>(); findMatches = FindObjectOfType <FindMatches>(); endGameManager = FindObjectOfType <EndGameManager>(); anim = GetComponent <Animator>(); }
// Use this for initialization void Start() { //get a handle on the board board = FindObjectOfType <Board>(); //targetX = (int)transform.position.x; //targetY = (int)transform.position.y; // row = targetY; // column = targetX; // previousRow = row; // previousColumn = column; hintManager = FindObjectOfType <HintManager>(); endGameManager = FindObjectOfType <EndGameManager>(); }
void Start() { board = FindObjectOfType <Board>(); sliderChange = FindObjectOfType <SliderChange>(); hint = FindObjectOfType <HintManager>(); int i = 0; foreach (Screen s in Screens) { if (s.name.Equals("Pause")) { PauseScreen = i; } i++; } }
void StartClip(int n) { if (clips.Length <= 0 || clips.Length <= n) { return; } source.Stop(); source.clip = clips[n]; i = n; source.pitch = pitch + (Random.Range(-1f, 1f) * pitchRange); source.Play(); repeated = false; //Hints HintManager.SetText(clips[n].name.ToUpper()); }
// Use this for initialization void Start() { isColumnBomb = false; isRowBomb = false; isColorBomb = false; isAdjacentBomb = false; endGameManager = FindObjectOfType <EndGameManager>(); hintManager = FindObjectOfType <HintManager>(); board = FindObjectOfType <Board>(); findMatches = FindObjectOfType <FindMatches>(); //targetX = (int)transform.position.x; //targetY = (int)transform.position.y; //row = targetY; //column = targetX; //previousRow = row; //previousColumn = column; }
// Update is called once per frame public void Dead() { if (body.beginDead == 1) { blood.Play(); body.beginDead = 0; if (Master.currentDirection == 1) { HintManager.SetText("你被杀死了,按Q键倒转.", 400); } else { HintManager.SetText("你被杀死了,按E键倒转.", 400); } } }
// Use this for initialization void Awake() { instance = this; }