public override void OnEnable()
        {
            base.OnEnable();

            comboSystem = (ComboSystem)target;
            comboSystem.SetExecutionOrder(-23);
        }
        public override void OnEnable()
        {
            base.OnEnable();

            comboSystem = (ComboSystem)target;
            comboSystem.SetExecutionOrder(-23);
        }
示例#3
0
    public static void Score(Puzzle puzzle)
    {
        ShowUI(true);
        singleton.source.Play();
        puzzle.solved = true;
        puzzle.ShowBoundry(false);

        if (laurelCoroutine != null)
        {
            singleton.StopCoroutine(laurelCoroutine);
        }
        if (resetCoroutine != null)
        {
            singleton.StopCoroutine(resetCoroutine);
        }
        Reseting        = false;
        laurelCoroutine = singleton.StartCoroutine(Laurel());
        int points = 0;

        singleton.laurelText.text  = laurelString;
        singleton.laurelText.text += string.Format(scoreFormatString, puzzle.accumulatedScore);
        points += puzzle.accumulatedScore;
        //if (puzzle.accumulatedBoxes == puzzle.quota + puzzle.threshold)
        //{
        //    singleton.laurelText.text += hundredPercentClearBonusString;
        //    points += 1000;
        //}
        if (!puzzle.puzzleWasReset)
        {
            singleton.laurelText.text += noResetBonusString;
            points += 1000;
        }
        ComboSystem.AddPoints(points);
    }
示例#4
0
    private void Awake()
    {
        uiController = GetComponent <UIController>();
        comboSystem  = GetComponent <ComboSystem>();

        volumeProfile.TryGet(out depthOfField);
    }
示例#5
0
        public void Initialize(ComboSystem comboSystem)
        {
            this.comboSystem = comboSystem;

            foreach (ComboSequenceItem item in items) {
                item.Initialize(comboSystem);
            }
        }
示例#6
0
 void Start()
 {
     instance         = this.gameObject.GetComponent <ComboSystem>();
     comboText        = GameObject.Find("ComBoObject").transform.GetChild(0).GetComponent <Text>();
     comboAnim        = comboText.transform.parent.GetComponent <Animator>();
     characterManager = GameObject.FindWithTag("Player").GetComponent <CharacterManager>();
     comboText.transform.parent.gameObject.SetActive(false);
 }
示例#7
0
文件: GameMain.cs 项目: Haegon/Spots
    public void Init()
    {
        m_PlayerData = Load();

        GameObject[] gos = GameObject.FindGameObjectsWithTag("spot");
        foreach (GameObject go in gos)
        {
            spotObjects.Add(ColorEx.GetRainbow(go.name), go);
        }

        m_GoldObject   = GameObject.Find("Button_Spot_Gold");
        m_Slider       = GameObject.Find("LeftTime").GetComponent <UISlider>();
        m_SliderSprite = GameObject.Find("FG").GetComponent <UISprite>();
        m_FeverSprite  = GameObject.Find("fever").GetComponent <UISprite>();

        m_BackGround  = GameObject.Find("BackGround_Game");
        m_OptionBGM   = GameObject.Find("Option_BGM").GetComponent <UIToggle>();
        m_OptionSound = GameObject.Find("Option_Sound").GetComponent <UIToggle>();

        m_OptionBGM.value   = m_PlayerData.BGM.ToBool();
        m_OptionSound.value = m_PlayerData.Sound.ToBool();

        GoIntro();
//		GoHome();

#if !UNITY_EDITOR
//		PlayGamesPlatform.DebugLogEnabled = true;
//		PlayGamesPlatform.Activate();
//		Social.localUser.Authenticate((bool success) => {
//			if ( success ) {
//
//			} else {
//				PlayGamesPlatform.Instance.SignOut();
//			}
//		});
#endif

        // Create a 320x50 banner at the top of the screen.
        BannerView bannerView = new BannerView(
            "ca-app-pub-4566735050109706/3877683272", AdSize.Banner, AdPosition.Bottom);
        // Create an empty ad request.
        AdRequest request = new AdRequest.Builder().Build();
        // Load the banner with the request.
        bannerView.LoadAd(request);

        cStyle.normal.textColor = Color.white;
        cStyle.alignment        = TextAnchor.MiddleRight;
        cStyle.fontSize         = 30 * Screen.height / 720;

        gStyle.normal.textColor = Color.yellow;
        gStyle.alignment        = TextAnchor.MiddleLeft;
        gStyle.fontSize         = 30 * Screen.height / 720;

        m_Combo = this.gameObject.AddComponent <ComboSystem>();

        isInitialize = true;
    }
        public void Initialize(ComboSystem comboSystem)
        {
            this.comboSystem = comboSystem;

            foreach (ComboSequence sequence in combos)
            {
                sequence.Initialize(comboSystem);
            }
        }
示例#9
0
        public void Initialize(ComboSystem comboSystem)
        {
            this.comboSystem = comboSystem;

            foreach (ComboSequenceItem item in items)
            {
                item.Initialize(comboSystem);
            }
        }
示例#10
0
 // Start is called before the first frame update
 void Start()
 {
     if (!singleton)
     {
         singleton = this;
     }
     else
     {
         DestroyImmediate(gameObject);
     }
     singleton.scoreText.text = score.ToString();
 }
    // Use this for initialization
    void Start()
    {
        opponent          = FindObjectOfType <Opponent>();
        opponentCharacter = opponent.GetComponentInChildren <Character>();
        physicsbody       = GetComponentInChildren <Rigidbody2D>();
        comboSystem       = GetComponent <ComboSystem>();
        chargeSystem      = GetComponent <ChargeSystem>();
        character.side    = Character.Side.P1;
        healthBar         = FindObjectOfType <HealthBarP1>();
        superBar          = FindObjectOfType <SuperBarP1>();

        if (character.GetComponent <FeiLong>() != null)
        {
            feiLong   = GetComponentInChildren <FeiLong>();
            feiLongAI = GetComponentInChildren <FeiLongAI>();
            CharacterInitialize(feiLongMugShot, "Fei Long", feiLongAI.Behaviors);
        }
        else if (character.GetComponent <Ken>() != null)
        {
            kenAI = GetComponentInChildren <KenAI>();
            CharacterInitialize(kenMugShot, "Ken", kenAI.Behaviors);
        }
        else if (character.GetComponent <Balrog>() != null)
        {
            balrogAI = GetComponentInChildren <BalrogAI>();
            CharacterInitialize(balrogMugShot, "Balrog", balrogAI.Behaviors);
        }
        else if (character.GetComponent <Akuma>() != null)
        {
            akumaAI = GetComponentInChildren <AkumaAI>();
            CharacterInitialize(akumaMugShot, "Akuma", akumaAI.Behaviors);
        }
        else if (character.GetComponent <Sagat>() != null)
        {
            sagatAI = GetComponentInChildren <SagatAI>();
            CharacterInitialize(sagatMugShot, "Sagat", sagatAI.Behaviors);
        }
        else if (character.GetComponent <MBison>() != null)
        {
            mbisonAI = GetComponentInChildren <MBisonAI>();
            CharacterInitialize(mbisonMugShot, "M Bison", mbisonAI.Behaviors);
        }

        projectileP1Parent = GameObject.Find("ProjectileP1Parent");
        if (projectileP1Parent == null)
        {
            projectileP1Parent = new GameObject("ProjectileP1Parent");
        }

        comboCounter = FindObjectOfType <ComboCounter>();
        introPlayed  = false;
    }
示例#12
0
    // Start is called before the first frame update
    void Start()
    {
        if (sprite != null)
        {
            sprite.enabled = false;
        }
        ComboSystem cs = GetComponent <ComboSystem>();

        if (cs != null)
        {
            cs.OnCombo += OnCombo;
        }
    }
示例#13
0
 private void ResetCombo()
 {
     if (combo_reset)
     {
         Current_Combo_Timer -= Time.deltaTime;
         if (Current_Combo_Timer <= 0f)
         {
             Current_Combo_Timer = Default_Combo_Timer;
             Current_ComboState  = ComboSystem.None;
             combo_reset         = false;
             Attacking           = false;
         }
     }
 }
示例#14
0
    void Update()
    {
        if (GameObject.FindObjectOfType <Score>())
        {
            score = GameObject.FindObjectOfType <Score>();

            currentScore = score.Base_Score;
        }
        else
        {
            Debug.Log("No Score Script Present");
        }

        // Find the 'ComboSystem' class and call it's 'cmbpo_amount' variable that holds the score.
        comboSystem = GameObject.FindObjectOfType <ComboSystem>();

        // Calculate the Accuracy Ratio in the game
        AccuRatio = (shurikensHit / shurikensThrown) * 100;

        if (AccuRatio >= 100f)
        {
            AccuRatio = 100f;
        }

        // Update the Maximum Combo
        if (comboSystem.cmbo_amount > currentMaxCombo)
        {
            currentMaxCombo = comboSystem.cmbo_amount;
        }

        // Update the the Life Counter
        if (score.LifeAmount <= 0)
        {
            // Disable the Spawning
            GameObject.Find("Spawners").GetComponent <EnemySpawner_Falling>().enabled = false;

            StartCoroutine(FinalResultScreen());
        }

        // Secret Goal
        if (score.Base_Score >= 1000)
        {
            StartCoroutine(FinalResultScreen());
        }

        // For updating the diffiulty of the game

        // DifficultyEscalate();
    }
示例#15
0
    //private float _slower = 0.0f;
    // Use this for initialization
    void Start()
    {
        SetPlayer(this.gameObject);
        _boxColliderKaki = ColliderKaki.GetComponent <BoxCollider2D>();

        // transisiCamera = FindObjectOfType<ProCamera2DTransitionsFX>();
        transisiCamera = Camera.main.GetComponent <ProCamera2DTransitionsFX>();
        if (transisiCamera)
        {
            transisiCamera.TransitionEnter();
        }

        linearDrag  = rigid2D.drag;
        combo_Sys   = Slider_Gayatri.GetComponentInParent <ComboSystem>();
        isReflect   = false;
        isFreeze    = false;
        isCrouching = false;
    }
    void Init()
    {
        if (Application.isEditor && GameMetrics.activeGameMode == GameMode.None)
        {
            GameMetrics.activeGameMode = GameMode.Speed;
            GameMetrics.selectedTrack  = 1;
        }

        SetGameState(GameState.Loading);

        //instance.m_player = (Player)FindObjectOfType(typeof(Player));
        MusicManager.Init();

        instance.m_player = (Player)GameObject.FindObjectOfType(typeof(Player));
        if (instance.m_player == null)
        {
            print("creating player");
            GameObject playergo = (GameObject)Instantiate(MenuManager.shipPrefabs[GameMetrics.selectedShip]);
            instance.m_player = (Player)playergo.GetComponent(typeof(Player));
        }

        instance.m_player.Init();

        gameMode = GameMetrics.activeGameMode;

        print(gameMode + " " + Application.loadedLevelName);

        GameMetrics.Init();

        ComboSystem.Init();

        //	GhostManager.Init();

        m_endlessModeRemainingLives = m_endlessModeStartingLives;
        m_lapTime     = 0f;
        m_bestLapTime = 1000f;
        m_currentLap  = 0;

        m_firstService = true;

        m_speedModeTimeLeft = m_speedModeTime;

        m_targetTunnelColor = speedLevelData[0].tunnelColor;
    }
示例#17
0
    public void TakeDamage(float incomingDamage)
    {
        if (damageTotem)
        {
            playerClass.TakeCalculatedDamage(incomingDamage * damageMultiplyer);
        }
        else
        {
            playerClass.TakeCalculatedDamage(incomingDamage);
        }


        if (playerClass.currentHealth <= 0)
        {
            Debug.Log("Player " + (playerCombat.playerIndex + 1) + " has died!");

            comboSystem = GetComponentInChildren <ComboSystem>();

            // Kill player
            comboSystem.PlayerDead();
            animator = GetComponentInChildren <Animator>();
            animator.SetTrigger("Dead");
        }
    }
示例#18
0
 public ComboMessenger(ComboSystem comboSystem)
 {
     this.comboSystem = comboSystem;
 }
示例#19
0
 public ComboSequenceManager(ComboSystem comboSystem)
 {
     this.comboSystem = comboSystem;
 }
 private void CreatePlayerInventory()
 {
     comboSystem = GetComponent <ComboSystem>();
 }
示例#21
0
 public ComboMessenger(ComboSystem comboSystem)
 {
     this.comboSystem = comboSystem;
 }
        public override void OnEnable()
        {
            base.OnEnable();

            comboSystem = (ComboSystem)target;
        }
示例#23
0
 public ComboSequence(ComboSystem comboSystem)
 {
     this.comboSystem = comboSystem;
 }
 public void Initialize(ComboSystem comboSystem)
 {
     this.comboSystem = comboSystem;
 }
 public ComboSequenceItem(ComboSystem comboSystem)
 {
     this.comboSystem = comboSystem;
 }
示例#26
0
 void Start()
 {
     collider = GetComponent <BoxCollider2D>();
     attack   = GetComponent <ComboSystem>();
     CaculateRaySpacing();
 }
示例#27
0
 public ComboInputManager(ComboSystem comboSystem)
 {
     this.comboSystem = comboSystem;
 }
示例#28
0
 public void Initialize(ComboSystem comboSystem)
 {
     this.comboSystem = comboSystem;
 }
 void Awake()
 {
     combat = GetComponent<ComboSystem>();
 }
示例#30
0
        public override void OnEnable()
        {
            base.OnEnable();

            comboSystem = (ComboSystem)target;
        }
示例#31
0
 private void Start()
 {
     Current_ComboState  = ComboSystem.None;
     Current_Combo_Timer = Default_Combo_Timer;
 }