private void Awake() { playerBehaviour = this; playerAnimator = GetComponent <Animator>(); playerAudioSource = GetComponent <AudioSource>(); GroudedCollider = GetComponent <CapsuleCollider>(); animationHash = GetComponent <AnimationHash>(); playerRigidbody = GetComponent <Rigidbody>(); particleManager = GetComponent <ParticleManager>(); attackSystem = GetComponent <AttackSystem>(); gravity = GetComponent <Gravity>(); damageCollider = GetComponent <CapsuleCollider>(); objectPoolManager = GetComponent <ObjectPoolManager>(); getHitComponent = GetComponent <GetHitComponent>(); PlayerShader.enabled = false; gameStageData = GameFacade.GetInstance().gameStageData; playerController = GameFacade.GetInstance().playerController; playerParameter = gameStageData.CurPlayerStageData.playerData.playerParameter; playerData = gameStageData.CurPlayerStageData.playerData; floorMask = LayerMask.GetMask("Floor"); playerState = PlayerState.Move; ForceMove = false; canfall = true; canTriggerFallingCoroutine = true; CreateWeapon(); }
public void NextStage() { PlayerData playerData = GameFacade.GetInstance().playerData; StageData[] stageDatas = GameFacade.GetInstance().stageDatas; playerData.StageIndex = Mathf.Min(playerData.StageIndex + 1, stageDatas.Length - 1); }
//初始化游戏基础 static public void InitGameBase() { //设置Log Application.logMessageReceived += OnLog; Application.logMessageReceivedThreaded += OnLog; //初始化游戏引擎的一些设置 GameSettings.OnInit(); // MVC GameFacade.GetInstance().OnInit(); // 场景管理 mSceneManager = MySceneManager.GetInstance(); mSceneManager.OnInit(); //添加全局FPS组件 Main.Instance.AddMainComponent <ShowFPS>(); //添加全局InGameLog组件 Main.Instance.AddMainComponent <InGameLog>(); // 对象池管理 GameObject poolRoot = new GameObject("GameObjectPool"); poolRoot.transform.SetParent(Main.Instance.transform); GameObjectPool.GetInstance().root = poolRoot; //Network NetManager.GetInstance().OnInit(); //Add temp entrance. Main.Instance.AddMainComponent <TempEntrance>(); initState = GameInitState.GameBaseInited; }
private void Awake() { playerData = GameFacade.GetInstance().playerData; levelData = GameFacade.GetInstance().levelData; gameUIController = GameFacade.GetInstance().GameUIController; gameStateData = GameFacade.GetInstance().gameStateData; }
private void Awake() { gameStageData = GameFacade.GetInstance().gameStageData; inputSetting = GameFacade.GetInstance().inputSetting; playerBehaviour = GetComponent <PlayerBehaviour>(); }
private void Awake() { animator = GetComponent <Animator>(); meshFader = GetComponent <MeshFader>(); audioSource = GetComponent <AudioSource>(); healthComponent = GetComponent <HealthComponent>(); playerController = GameFacade.GetInstance().PlayerController; }
private void Awake() { Input.multiTouchEnabled = true; gameStateData = GameFacade.GetInstance().gameStateData; audioController = GameFacade.GetInstance().AudioController; enemyController = GameFacade.GetInstance().EnemyController; gameUIController = GameFacade.GetInstance().GameUIController; }
public override void StateEnd() { if (GameFacade.GetInstance().isGameOver) { m_controller.SetState(new MainMenuState(m_controller)); } GameFacade.GetInstance().Release(); }
protected virtual void Awake() { rigid = GetComponent <Rigidbody>(); audioSource = GetComponent <AudioSource>(); playerController = GameFacade.GetInstance().PlayerController; meshFader = GetComponent <MeshFader>(); col = GetComponent <Collider>(); }
private void Awake() { gameStageController = GameFacade.GetInstance().gameStageController; gameStageData = GameFacade.GetInstance().gameStageData; concentric = Instantiate(ConcentricPrefab, GameObject.FindGameObjectWithTag("UI").transform).GetComponent <Image>(); mainCamera = this; }
//public GameObject Weapon; private void Awake() { gameStageData = GameFacade.GetInstance().gameStageData; GameObject mainCamera = Instantiate(gameStageData.CurPlayerStageData.playerData.MainCamera, new Vector3(0, 0, 0), playerStartPos.rotation); GameObject player = Instantiate(gameStageData.CurPlayerStageData.playerData.Player, playerStartPos.position, playerStartPos.rotation); mainCameraBehaviour = mainCamera.GetComponent <MainCamera_New>(); playerBehaviour = player.GetComponent <PlayerBehaviour>(); }
IEnumerator LoadData() { yield return(new WaitForEndOfFrame()); playerData = GameFacade.GetInstance().stageDataController.PlayerJson; /* Debug.Log(playerData.Score); * text.text = playerData.Score.ToString();/*/ // Debug.Log(playerData.MaxFallSpeed); }
private void Init() { playerBehaviour = this; rigidbody2 = gameObject.GetComponent <Rigidbody2D>(); gameManager = GameFacade.GetInstance().gameManager; StartCoroutine(LoadData()); // gameObject.transform.parent.gameObject.transform.position = StartPosition.position; }
private void Awake() { healthBehavior = GetComponent <HealthComponent>(); audioSource = GetComponent <AudioSource>(); meshFader = GetComponent <MeshFader>(); animator = GetComponent <Animator>(); dropableBehavior = GetComponent <DropableBehavior>(); playerController = GameFacade.GetInstance().PlayerController; gameUIController = GameFacade.GetInstance().GameUIController; gameStateData = GameFacade.GetInstance().gameStateData; }
public override void StateStart() { GameFacade.GetInstance().Init(); }
private void Awake() { Input.multiTouchEnabled = true; enemyController = GameFacade.GetInstance().EnemyController; }
private void Awake() { gameStageController = GameFacade.GetInstance().gameStageController; gameStageData = GameFacade.GetInstance().gameStageData; }
private void Awake() { objectPool = GameFacade.GetInstance().objectPool; CreatObjectPoolItemInfoCollection(); }
private void Awake() { dropItemData = GameFacade.GetInstance().dropItemData; }
public override void StateUpdate() { GameFacade.GetInstance().Update(); }
private void Awake() { gameStateData = GameFacade.GetInstance().gameStateData; }
static public void OnReset() { UpdateManager.GetInstance().OnReset(); GameFacade.GetInstance().OnReset(); mSceneManager.OnReset(); }
private void Awake() { playerData = GameFacade.GetInstance().playerData; levelData = GameFacade.GetInstance().levelData; RefreshPlayerData(); }
private void Init() { // GameFacade.GetInstance().stageDataController. playerController = gameObject.GetComponent <PlayerController>(); obstacleController = GameFacade.GetInstance().obstacleController; }
public void Awake() { Input.multiTouchEnabled = true; enemyController = GameFacade.GetInstance().EnemyController; gameStateData = GameFacade.GetInstance().gameStateData; }
private void Awake() { gameStateData = GameFacade.GetInstance().gameStateData; gameUIController = GameFacade.GetInstance().GameUIController; audioController = GameFacade.GetInstance().AudioController; }