// Start is called before the first frame update void Start() { stat = this.GetComponent <PlayerStatics>(); charaCtrl = this.GetComponent <CharacterController>(); iController = padController.GetComponent <IVirtualController>(); animCtr = this.GetComponent <Animator>(); }
public static void Click() { fileName = "PlayerStatics"; PlayerStatics player = ScriptableObject.CreateInstance <PlayerStatics>(); CreateAsset(player); }
// 星の表示処理 void PutStar(PlayerStatics _player, RectTransform _star) { Vector2 _size = _star.sizeDelta; _size.x = _player.star * STAR_TILE_SIZE; _star.sizeDelta = _size; }
// チョコの表示処理 void PutChoco(PlayerStatics _player, RectTransform _choco) { Vector2 _size = _choco.sizeDelta; _size.x = _player.bulletRemain * CHOCO_TILE_SIZE; _choco.sizeDelta = _size; }
void InitGame() { Debug.Log("Init Game"); //gameStart=true; GetObjects(); doingSetup = true; levelImage = GameObject.Find("LevelImage"); levelText = GameObject.Find("LevelText").GetComponent <Text>(); levelText.text = "Day " + level; levelImage.SetActive(true); Invoke("HideLevelImage", levelStartDelay); //HideLevelImage(); boardManager.SetupScene(level); enemies.Clear(); //InitPlayer tempPlayer = Instantiate(playerOBJ); tempPlayer.gameObject.transform.position = new Vector3(playerStartX, playerStartY, 0); //Init Player Data Manager if (firstInitPlayer == true) { Debug.Log("create player class"); player = new PlayerStatics(tempPlayer); firstInitPlayer = false; player.HP = startHP; } //Debug.Log("GM HP: "+playerHP); }
private void Awake() { if (_instance != null && _instance != this) { Destroy(gameObject); } else { _instance = this; } }
// Start is called before the first frame update void Start() { GameObject _controller = GameObject.FindWithTag("GameController"); vsController = _controller.GetComponent <VSGameController>(); player1 = vsController.player1; player2 = vsController.player2; choco_posX = choco1.position.x; }
// Start is called before the first frame update void Start() { stat = this.GetComponent <PlayerStatics>(); iController = padController.GetComponent <IVirtualController>(); invincibleSphere = this.transform.Find("invincibleSphere").GetComponent <MeshRenderer>(); }
void Start() { statics = this.GetComponent <PlayerStatics>(); }