Example #1
0
	void Awake () {
		_instance = this;
		foreach (Transform c in transform) {
			if (c.CompareTag ("Stage")) {
				var s = c.gameObject.GetComponent <Stage> ();
				if (s != null) {
					stages.Add (s);
				} else {
					throw new UnityException ("stage tag gameobject must have stage component");
				}
			}
		}
		designRequireSouls.Clear ();
		var balanceText = Resources.Load<TextAsset> ("Design/stagebalance");
		Debug.Assert (balanceText != null);
		using (StringReader r = new StringReader (balanceText.text)) {
			string line = string.Empty;
			do {
				line = r.ReadLine ();
				if (string.IsNullOrEmpty (line) == false) {
					line = line.Replace ('\r', '\0').Replace ('\n', '\0');
					if (line.Length > 0) {
						var splitted = line.Split (new char[] {','});
						Debug.Assert (splitted.Length == 2);
						int level = int.Parse (splitted [0]);
						int soul = int.Parse (splitted [1]);
						designRequireSouls.Add (level, soul);
					}
				}
			} while (string.IsNullOrEmpty (line) == false);
		}
	}
Example #2
0
    public static IEnumerator moveUnitAlongPath(float time, Unit u, Path path, StageManager stage)
    {
        float dt = 0;
        int distance = path.distance();

        for(;;){
            dt += Time.deltaTime;
            if (dt >= time || distance == 1) {
                break;
            }
            //which step
            float completedAMT = ((dt*(distance-1))/time);
            int sq = (int)completedAMT;
            float pct = completedAMT - sq;

            Point p1 = path.at(sq);
            Point p2 = path.at(sq+1);
            float x = Mathf.Lerp(p1.x, p2.x, pct);
            float y = Mathf.Lerp(p1.y, p2.y, pct);

            u.transform.position = new Vector2(x, y);
            yield return null;

        }
        Point dest = path.destination();
        u.transform.position = new Vector2(dest.x, dest.y);
        u.tile.unit = null;
        u.tile = stage.tiles[dest.x][dest.y];
        u.tile.unit = u;
    }
Example #3
0
    public void InGameHelpRelaese()
    {
        if (LobbyHelp.activeInHierarchy)
            LobbyHelp.SetActive(false);

        if(null == stateManger)
            stateManger = GameObject.FindObjectOfType<StageManager>();

        Time.timeScale = stateManger.temp_timescale;
        StageManager.stage_phase = stateManger.temp_phase;
        stateManger.first_check = false;

        stateManger.forced_matrix_state = 0;
        StageManager.matrix_state = true;
        stateManger.touch_panel.SetActive(true);

        //if (StageManager.stage_phase != StageManager.StagePhase.PAUSE && StageManager.stage_phase != StageManager.StagePhase.FINISH)
        //{
        //    stateManger.MatrixCheck();
        //}

        //StageManager.first_check = false;
        //StageManager.matrix_state = true;




    }
Example #4
0
 private void Start()
 {
     sm = StageManager.Instance;
     sm.teamGoals.Add(GlobalManager.instance.GetTeamName(teamID), this);
     mr = GetComponent <MeshRenderer>();
     Debug.Log(mr);
     ChangeTeam();
 }
 // Use this for initialization
 void Start()
 {
     timeGauge = this.GetComponent<Image> ();
     timeGauge.fillAmount = 0.0f;
     remainTime = 0.0f;
     isGaugeMoving = false;
     stageManager = GameObject.FindObjectOfType<StageManager> ();
 }
Example #6
0
 public void PrevStagesPage()
 {
     if (StageManager.CurrentPage > 0)
     {
         StageManager.CurrentPage--;
         StageManager.SetStageList();
     }
 }
Example #7
0
 public void NextStagesPage()
 {
     if (StageManager.CurrentPage < StageManager.MaxStagePage)
     {
         StageManager.CurrentPage++;
         StageManager.SetStageList();
     }
 }
Example #8
0
    public override void Update(StageManager stageManager)
    {
        int starCount = stageManager.playerController.Star - previousStarAmount;

        progress += starCount;

        previousStarAmount = stageManager.playerController.Star;
    }
		public AlertViewModel(StageManager navigator)
		{
			Contract.ArgumentNotNull("navigator", navigator);

			this.navigator = navigator;

			ButtonLabels = new string[] { "OK" };
		}
Example #10
0
    //-------------------------------------------
    // Member functions

    void Awake()
    {
        if (_instance == null)
        {
            _instance = this;
            DontDestroyOnLoad(this);
        }
    }
	void Awake() {
		if (instance == null)
			instance = this;
		else
			Destroy(gameObject);
		stages = GetComponents<Stage>();

	}
Example #12
0
    private void Start()
    {
        _stageManager  = FindObjectOfType <StageManager>();
        _playerManager = FindObjectOfType <PlayerManager>();

        scoreAdded = false;
        CalculateTotalPointsInLevel();
    }
Example #13
0
 private void Start()
 {
     sm = Utils.GetStage(transform);
     sm.teamGoals.Add(GlobalManager.instance.GetTeamName(teamID), this);
     mr = GetComponent <MeshRenderer>();
     mr.material.color = GlobalManager.instance.GetTeamColor(teamID);
     teamName          = GlobalManager.instance.GetTeamName(teamID);
 }
Example #14
0
 void pingManagers()
 {
     GameManager.ping();
     BeatManager.ping();
     GraphicsManager.ping();
     StageManager.ping();
     GDMethods.init();
 }
Example #15
0
 // Use this for initialization
 void Start()
 {
     nameText = transform.GetChild(1).GetComponent <Text> ();
     mainText = transform.GetChild(2).GetComponent <Text> ();
     chatTest = new ChatTest();
     SetActiveText(chatTest.returnChatByPart(1));
     stageManager = GameObject.Find("StageManager").GetComponent <StageManager>();
 }
Example #16
0
 private void Awake()
 {
     gameMain        = FindObjectOfType <GameMain>();
     spriteRenderer  = GetComponentInChildren <SpriteRenderer>();
     polygonCollider = GetComponent <PolygonCollider2D>();
     stageManager    = GameObject.Find("StageManager").GetComponent <StageManager>();
     isPlaying       = false;
 }
Example #17
0
	public void FindObjects () {
		mStageManager = GetComponentInParent<StageManager> ();
		mIdolStageStatusManager = GetComponentInChildren<IdolStageStatusManager> ();
		mBackgroundTexture = GetComponentInChildren<UITexture> ();
		mSkipConstructionButtonObject = transform.FindChild ("SkipConstructionButton").gameObject;
		mSleepObject = transform.FindChild ("Sleep").gameObject;
		mIdolStageStatusManager.FindObjects ();
	}
Example #18
0
    // Use this for initialization
    void Start()
    {
        maxCursor   = Cursorobjlist.Count;
        nowCursorno = 0;

        stageMG   = GameObject.Find("StageManager").GetComponent <StageManager>();
        spriteFlg = false;
    }
Example #19
0
	// Use this for initialization
	void Start () 
    {
        SM = GameObject.Find("StageManager").GetComponent<StageManager>();
        player = GameObject.Find("PlayerManager").GetComponent<PlayerManager>();
        p_position = GameObject.FindWithTag("player");
        SM.SetforcedMatrix(1, 1.0f);
        StartCoroutine(Act());
	}
Example #20
0
 // Use this for initialization
 void Awake()
 {
     Input.multiTouchEnabled = false;
     UIConfig      = FindObjectOfType(typeof(MenuManager)) as MenuManager;
     stageManager  = FindObjectOfType(typeof(StageManager)) as StageManager;
     generateColor = FindObjectOfType(typeof(ColorSelector)) as ColorSelector;
     audioman      = FindObjectOfType(typeof(AudioSystem)) as AudioSystem;
 }
Example #21
0
    void OnEnable()
    {
        stageManager = GameObject.FindGameObjectWithTag("Manager").GetComponentInChildren<StageManager>();
        gameOver = GameObject.FindGameObjectWithTag("GameOver");

        StartCoroutine(CheckMonster());
        gameOver.SetActive(false);
    }
Example #22
0
 public void Load(GameManager gameManager)
 {
     StageManager sm = new StageManager(gameManager);
     sm.currentStage = currentStage;
     sm.maxStage = maxStage;
     sm.stageMonsterCounter = stageMonsterCounter;
     gameManager.stageManager = sm;
 }
Example #23
0
    void Start()
    {
        GameMain.OnNextGame += UpdateUI;
        stageManager         = FindObjectOfType <StageManager>();

        startSequence = DOTween.Sequence();
        SetStartSequence();
    }
Example #24
0
        void Awake()
        {
            Assert.IsNull(instance);
            instance = this;

            this.ActorManager = new ActorManager();
            this.StageManager = new StageManager();
        }
 public IEnumerator OnExecute()
 {
     StageManager.Resume(fade);
     while (true)
     {
         yield return(null);
     }
 }
Example #26
0
 public static StageManager Get()
 {
     if (instance == null)
     {
         instance = new StageManager();
     }
     return(instance);
 }
Example #27
0
 /// <summary>
 /// 아이템을 사용 가능한 상태로 세팅합니다.
 /// </summary>
 /// <param name="itemData"></param>
 public virtual void Initialize(ItemData itemData, Player player, StageManager stageManager)
 {
     coordinate         = new Vector2Int(itemData.posX, itemData.posY);
     transform.position = new Vector3(itemData.posX, 0, itemData.posY) * TilePositionSetting.Instance.tileInterval;
     value             = itemData.value;
     this.player       = player;
     this.stageManager = stageManager;
 }
Example #28
0
 // Use this for initialization
 void Start()
 {
     postCamera = GameObject.Find("PostCamera");
     postCamera.SetActive(false);
     boxCollider     = GetComponent <BoxCollider2D>();
     stageManager    = GameObject.Find("StageManager").GetComponent <StageManager>();
     oldCurrentState = GameMain.GetCurrentState();
     ChangeActivePlayer();
 }
Example #29
0
 /// <summary>
 /// 入场结束
 /// </summary>
 protected void EnterSceneOver()
 {
     m_effectCount++;
     if (m_effectCount >= (uiStageParts.Count + 1))
     {
         ToolKit.delayCall(0.1f, WaitAnchor);
         StageManager.StageChangeOver();
     }
 }
    public void Setup(Unit actor, Path path, List<Unit> targetableUnits)
    {
        this.actor = actor;
        this.currentStage = CampaignManager.Instance.CurrentStage();
        this.highlighter = currentStage.GetComponent<Highlighter>();
        this.targetableUnits = targetableUnits;

        RecalculateHighlights();
    }
    public void Setup(Unit actor, Path path, List <Unit> targetableUnits)
    {
        this.actor           = actor;
        this.currentStage    = CampaignManager.Instance.CurrentStage();
        this.highlighter     = currentStage.GetComponent <Highlighter>();
        this.targetableUnits = targetableUnits;

        RecalculateHighlights();
    }
Example #32
0
    public override void Initialize()
    {
        rb           = GetComponent <Rigidbody>();
        tr           = GetComponent <Transform>();
        stageManager = tr.GetComponentInParent <StageManager>();
        originMt     = floorRd.material;

        MaxStep = 5000;
    }
Example #33
0
 public void BuildWorldReflections()
 {
     stageManager = GameObject.FindGameObjectWithTag("Stage").GetComponent<StageManager>();
     bounds = stageManager.GetBounds();
     ClearWorldReflections();
     BuildReflections(new Vector3(bounds.size.x, 0.0f, 0.0f), ReflectionsX);
     BuildReflections(new Vector3(0.0f, bounds.size.y, 0.0f), ReflectionsY);
     BuildReflections(new Vector3(0.0f, 0.0f, bounds.size.z), ReflectionsZ);
 }
    // Start is called before the first frame update
    void Start()
    {
        playerRigidbody = this.GetComponent <Rigidbody>();

        manager = GameObject.FindGameObjectWithTag("StageManager").GetComponent <StageManager>();

        Cursor.lockState = CursorLockMode.None;
        Cursor.visible   = true;
    }
Example #35
0
    //public AudioClip audioClip;
    //AudioSource audioSource;

    // Use this for initialization
    void Start()
    {
        pos                       = gameObject.transform.position;
        ef_pos                    = effect.transform.position;
        stage_manager             = GameObject.Find("GameController").GetComponent <StageManager>();
        effect.transform.position = transform.position;
        //audioSource = gameObject.GetComponent<AudioSource>();
        //audioSource.clip = audioClip;
    }
Example #36
0
 void Awake()
 {
     score              = 0;
     total              = 0;
     getMoney           = 0;
     moneyScore         = GameObject.Find("Canvas").transform.Find("moneyScore").gameObject.GetComponent <Text>();
     moneyScore.enabled = false;
     StageManager       = GameObject.Find("StageManager").GetComponent <StageManager>();
 }
Example #37
0
    void Start()
    {
        gameManager  = GameManager.Instance;
        stageManager = FindObjectOfType <StageManager>();
        poolManager  = FindObjectOfType <UnitPooling>();

        spawnPosition = gameManager.GetUnitSpawnPosition();
        spawnCostText = transform.GetChild(1).GetComponent <Text>();
    }
Example #38
0
    void Awake()
    {
        if (instance != null && instance != this)
        {
            Destroy(gameObject);
        }

        instance = this;
    }
Example #39
0
    // Use this for initialization
    void Start()
    {
        SB       = GetComponentInChildren <Scrollbar>();
        SB.value = 1;
        SM       = GameObject.Find("QuestManager").GetComponent <StageManager>();

        GameObject.Find("Content/Work").GetComponent <Image>().enabled = false;
        GameObject.Find("Content/Fix").GetComponent <Image>().enabled  = false;
    }
Example #40
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        _uiManager = FindObjectOfType <UIManager>();
    }
Example #41
0
 void Start()
 {
     body2D       = GetComponent <Rigidbody2D>();
     rendered2D   = GetComponent <SpriteRenderer>();
     controller   = GetComponent <PlayerController>();
     stage        = GetComponentInParent <StageManager>();
     animator     = GetComponent <Animator>();
     defaultScale = transform.localScale.x;
 }
Example #42
0
 public void BuildWorldReflections()
 {
     stageManager = GameObject.FindGameObjectWithTag("Stage").GetComponent <StageManager>();
     bounds       = stageManager.GetBounds();
     ClearWorldReflections();
     BuildReflections(new Vector3(bounds.size.x, 0.0f, 0.0f), ReflectionsX);
     BuildReflections(new Vector3(0.0f, bounds.size.y, 0.0f), ReflectionsY);
     BuildReflections(new Vector3(0.0f, 0.0f, bounds.size.z), ReflectionsZ);
 }
Example #43
0
	// Use this for initialization
	void Start () {
        SM = GameObject.Find("StageManager").GetComponent<StageManager>();
        player = GameObject.Find("PlayerManager").GetComponent<PlayerManager>();
        p_position = GameObject.FindWithTag("player");

        effect = (GameObject)Instantiate(ResourceLoad.PickGameObject("eskill_10"));
        effect.transform.position = new Vector3(p_position.transform.position.x, p_position.transform.position.y + 350, 0); 
        SM.SetforcedMatrix(1, 1.0f);
        StartCoroutine(Act());
	}
Example #44
0
 void Awake()
 {
     //シーンをまたいでも消えないオブジェクト
     if(singleInstance == null){
         singleInstance = this;
         GameObject.DontDestroyOnLoad(this.gameObject);
     }else{
         GameObject.Destroy(this.gameObject);
     }
 }
Example #45
0
    public void InGameHelpPause()
    {
        if (!LobbyHelp.activeInHierarchy)
            LobbyHelp.SetActive(true);

        stateManger = GameObject.FindObjectOfType<StageManager>();


        stateManger.temp_phase = StageManager.stage_phase;
        StageManager.stage_phase = StageManager.StagePhase.PAUSE;
    }
 private void BuildNewStage(List<UnitStats> playerArmy)
 {
     GameObject g = Instantiate(StagePrefab) as GameObject;
     currentStage = g.GetComponent<StageManager>();
     currentStage.Build(playerArmy);
     BoundCameraToBoard b = mainCamera.GetComponent<BoundCameraToBoard>();
     if (b == null) {
         b = mainCamera.gameObject.AddComponent<BoundCameraToBoard>();
     }
     b.stage = currentStage.gameObject;
 }
Example #47
0
	// Use this for initialization
	void Start () {
        SM = GameObject.Find("StageManager").GetComponent<StageManager>();
        player = GameObject.Find("PlayerManager").GetComponent<PlayerManager>();
        p_position = GameObject.FindWithTag("player");

        effect = (GameObject)Instantiate(ResourceLoad.PickGameObject("eskill_6"));
        effect.transform.position = p_position.transform.position;
        SM.SetforcedMatrix(1, 3.0f);
        StartCoroutine(Act());
       // op.x = -60.0f;
	}
 void Start()
 {
     talkManager = GameObject.Find("TalkManager").GetComponent<TalkManager>();
     stageManager = GameObject.Find("StageManager").GetComponent<StageManager>();
     charas = GameObject.FindGameObjectsWithTag("Character");
     fpController = GetComponent<FirstPersonController>();
     for(int i=0; i<charas.Length; i++){
         character.Add(new CharacterViewController());
         character[i] = charas[i].GetComponent<CharacterViewController>();
     }
 }
Example #49
0
	// Use this for initialization
	void Start () {
        SM = GameObject.Find("StageManager").GetComponent<StageManager>();
        effect = (GameObject)Instantiate(ResourceLoad.PickGameObject("eskill_8"));
        if (effect == null)
        {
            return;
        }
        effect.transform.position = new Vector3(GameObject.FindWithTag("player").transform.position.x, -800, 0);
        SM.SetforcedMatrix(1, 1.5f);
        StartCoroutine(Act());
	}
Example #50
0
 public int cost(Unit actor, StageManager manager)
 {
     int sum = 0;
     foreach (Point p in points) {
         if (p == points[0]) {
             // Skip the starting point.
             continue;
         }
         sum += actor.cost(manager.tiles[p.x][p.y]);
     }
     return sum;
 }
		public SignInViewModel(
			StageManager navigator, 
			SessionState sessionState,
			AuthenticationService authenticator,
			SessionService sessionService,
			CourseSettingsService courseSettingsService)
		{
			this.navigator = navigator;
			this.sessionState = sessionState;
			this.authenticator = authenticator;
			this.sessionService = sessionService;
			this.courseSettingsService = courseSettingsService;
		}
Example #52
0
    void Awake()
    {
        if (instance == null)
        {
            instance = this;
        }
        else if (instance != this)
        {
            Destroy(gameObject);
        }

        jsonFM = GameObject.Find("GameManager").GetComponent<JsonFileManager>();
    }
		public MainMenuViewModel(
			StageManager navigator, 
			SessionState sessionState,
			AuthenticationService authenticator, 
			ActivityService activityService,
			ActivityLauncher activityLauncher)
		{
			this.navigator = navigator;
			this.sessionState = sessionState;
			this.authenticator = authenticator;
			this.activityService = activityService;
			this.activityLauncher = activityLauncher;
		}
Example #54
0
    // Use this for initialization

    void Start()
    {
        text = Resources.Load<GameObject>("Prefabs/hud/Damage_Text");

        SM = GameObject.Find("StageManager").GetComponent<StageManager>();
        player = GameObject.Find("PlayerManager").GetComponent<PlayerManager>();
        cutM = GameObject.Find("CutIn_panel").GetComponent<CCutinManager>();
        for (int i = 0; i < HudEventManager.playernum; i++)
        {
            skill_num[i] = 0;
            skill_on[i] = false;
            skill_used[i] = false;
        }
    }
 void Awake()
 {
     if(Instance==null){
         Instance=this;
     }
     stageList.Add(new Stage(20,1,0));
     stageList.Add(new Stage(15,2,0));
     stageList.Add(new Stage(12,3,0));
     stageList.Add(new Stage(10,2,1));
     stageList.Add(new Stage(8,3,1));
     stageList.Add(new Stage(8,2,2));
     stageList.Add(new Stage(6,1,1));
     stageList.Add(new Stage(6,2,1));
     stageList.Add(new Stage(5,1,2));
     stageList.Add(new Stage(5,2,2));
 }
Example #56
0
    void Start() 
    {
        SM = GameObject.Find("StageManager").GetComponent<StageManager>();
        
        effect = (GameObject)Instantiate(ResourceLoad.PickGameObject("eskill_1"));
        if (effect == null)
        {
            return;
        }
        player = GameObject.Find("PlayerManager");
        if (player == null)
        {
            return;
        }

        player.SendMessage("BeInvincible", 1.5f);
        SM.SetforcedMatrix(1, 1.5f);
        StartCoroutine(Act());
    }
Example #57
0
    void Start () {
        panel = GameObject.Find("Content Panel").transform;
        canvas = GameObject.Find("Game").transform;
        if (File.Exists(Application.persistentDataPath + "/save.dat"))
        {
            Load();
        }
        else
        {
            stageManager = new StageManager(this);
            monster = new Monster(stageManager.currentStage, MonsterRank.NORMAL, this);
            bossTimer = 30;
            heroes = new List<GameObject>();
            heroes.Add(CreateButton(10, 2, "Sachulus The Great"));
            heroes.Add(CreateButton(100, 20, "Vetolus The Great"));
            heroes.Add(CreateButton(1000, 200, "Johnulus The Great"));
            heroes.Add(CreateButton(10000, 2000, "Gjappulus The Great"));
            heroes.Add(CreateButton(100000, 20000, "Holymoonus The Great"));
            heroes.Add(CreateButton(1000000, 200000, "Lukalus The Great"));
        }
		StartCoroutine (AutoTick ());
	}
Example #58
0
    void Start() 
    {
        PM = GameObject.Find("PlayerManager").GetComponent<PlayerManager>();
        SM = GameObject.Find("StageManager").GetComponent<StageManager>();
        if ((effect = (GameObject)Instantiate(ResourceLoad.PickGameObject("eskill_2"))) == null)
        {
            return;
        }
        for(int i = 0; i<PM.member_count; i++)
        {
            if(PM.players_info[i].position == Position.FIRST)
            {
                player = PM.players[i];
                break;
            }
        }
        effect.transform.position = player.transform.position;

        SM.SetforcedMatrix(1, 4.0f);
        PM.SendMessage("BeInvincible", 6f);

        StartCoroutine(Act());
    }
    // Use this for initialization
    void Start()
    {
        stageManager = GameObject.FindObjectOfType<StageManager> ();
        this.hand = GameObject.Find ("hand");
        this.handCount = this.hand.transform.FindChild ("HandCount").GetComponent<Text>();
        this.hand.SetActive (false);

        this.position_list.Add(GameObject.Find("top_left").transform.position);
        this.position_list.Add(GameObject.Find("top_center").transform.position);
        this.position_list.Add(GameObject.Find("top_right").transform.position);
        this.position_list.Add(GameObject.Find("bottom_left").transform.position);
        this.position_list.Add(GameObject.Find("bottom_center").transform.position);
        this.position_list.Add(GameObject.Find("bottom_right").transform.position);
        this.position_list.Add(GameObject.Find("middle_center").transform.position);
    }
		public LoadingViewModel(StageManager navigator)
		{
			this.navigator = navigator;
		}