bool isStartAct = false; // 行動開始するか // Use this for initialization void Start() { // 他のクラスでも使う関数を切り出した //generalFunc = new GeneralFunc (); // 左右の向きを親クラスから取得 moveX = this.GetComponentInParent <MoveX>(); isLeft = moveX.GetIsLeft(); // コピー用銛をDeactiveに boatSpear.SetActive(false); // 一斉攻撃のタイミング取得用 // BoatManagerはGameController経由で取得 gameControllerObj = GameObject.FindWithTag("GameController"); gameCtrl = gameControllerObj.GetComponent <GameController>(); boatManager = gameCtrl.GetBoatManager(); // 設定値取得等の初期設定 InitSetting(); // ダメージの確認用 boatDamage = this.GetComponent <BoatDamage> (); // 銛関係のマネージャ GameObject obj = new GameObject("SpearManger"); SpearManager smAddComponet = obj.AddComponent <SpearManager> (); spearManager = smAddComponet; }
// Start is called before the first frame update public void Init(Team team) { this.id = BoatManager.getNextId(); this.team = team; this.LoadBoatEntities(); this.rigid = this.GetComponent <Rigidbody2D>(); }
// Use this for initialization void Start() { // 漁船関係をまとめたオブジェクトを作成 GameObject obj = new GameObject("BoatManager"); BoatManager bmAddComponet = obj.AddComponent <BoatManager> (); boatManager = bmAddComponet; boatManager.Init( createMinX, createMaxX, createMinY, createMaxY, japBoats ); // 漁船のコピー元Objをdeactive for (int i = 0; i < japBoats.Length; i++) { japBoats[i].SetActive(false); } // ゲームオーバー用にイルカの生存フラグをみる GameObject dolpObj = GameObject.FindWithTag("Player"); dolphinCtrl = dolpObj.GetComponent <DolphinController>(); IsGameOver = false; HasPushRetry = false; }
// Use this for initialization void Start() { _hungryNum = Random.value * 0.6f + 0.4f; _boatMgr = FindObjectOfType <BoatManager>(); anim = GetComponent <Animator>(); }
void GameEnd() { // 終了時 if (GameTime >= 120 || getBoatAlive() == 0) { BoatManager boats = GetComponent <BoatManager> (); boats.enabled = false; } }
// Use this for initialization //new void Awake () { // base.Awake(); // boatManager = boat.GetComponent<BoatManager>(); // //float posX = transform.position.x * (boat.position.x + Random.Range(0, 5)); // //float posY = transform.position.y + Random.Range(3, 7 + 2); //TODO no magic number!! // //transform.position = new Vector2(posX, posY); // manualInput = ManualInputs.instance; // arduino = manualInput.arduinos[arduinoNum]; // } new void Start() { base.Start(); boatManager = boat.GetComponent <BoatManager>(); //float posX = transform.position.x * (boat.position.x + Random.Range(0, 5)); //float posY = transform.position.y + Random.Range(3, 7 + 2); //TODO no magic number!! //transform.position = new Vector2(posX, posY); manualInput = ManualInputs.instance; arduino = manualInput.arduinos[arduinoNum]; }
private void Awake() { if (_instance != null && _instance != this) { Destroy(this.gameObject); } else { _instance = this; } }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Debug.Log("Instance already exists, destroying object!"); Destroy(this); } }
// Use this for initialization //new void Start () { // base.Start(); // boatManager = boat.GetComponent<BoatManager>(); // manualInput = ManualInputs.instance; // arduinoOutput = manualInput.arduinos[arduinoOutputNum]; // } void OnEnable() { if (boatManager == null) { base.Start(); boatManager = boat.GetComponent <BoatManager>(); manualInput = ManualInputs.instance; arduinoOutput = manualInput.arduinos[arduinoOutputNum]; } StartCoroutine("startSound"); toggleLED(); isLeaking = true; Debug.Log("Leak enabled: " + gameObject.name); }
private void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Debug.Log("Instance already exists, destroying object!"); Destroy(this); } foreach (BoatEntity boatEntity in BoatEntities) { BoatEntityByType[boatEntity.BoatEntityType] = boatEntity; } }
public void GameEnd() { _boatMgr = FindObjectOfType <BoatManager>(); float totalPoint = 0; for (int i = 0; i < _boatMgr.BoatArray.Length; i++) { totalPoint += _boatMgr.BoatArray[i].Count; } _score.treasurePoint = totalPoint; _score.aliveBoat = _boatMgr.getBoatAlive(); FindObjectOfType <FadeCtrl.FadeController>().StartFadeOut("Result"); //SceneManager.LoadScene("Result"); }
public frmConfirmBoatRental(Boat boat, User user, BoatManager boatManager) { InitializeComponent(); // if the user has no permission, close the form var hasPermission = false; foreach (var role in user.Roles) { if (role.RoleName == "Rental") { hasPermission = true; break; } } if (hasPermission == false) { this.Close(); } _boat = boat; _boatManager = boatManager; }
public void StartGame() { Vector3 position = Vector3.zero; foreach (Team team in instance.Teams.Values) { Boat boat = BoatManager.instance.SpawnBoat(team, position, Quaternion.identity); position.y += 3; foreach (Player player in team.Players.Values) { PirateManager.instance.SpawnPirate(player, boat); } } BoatManager.SendBoatsToPlayers(); PirateManager.instance.SendPirates(); using (Packet packet = new Packet((int)ServerPackets.gameStart)) { ServerSend.SendTCPDataToAll(packet); } }
public Boat[] GetBoatsByCustomerId(int id) { return(BoatManager.GetBoatsByCustomerId(id).ToArray()); }
private void Start() { _manager = GetComponent<BoatManager>(); ApplyCannonsAngle(); }
void Awake() { Body = GetComponent <Rigidbody>(); BoatManager = GetComponent <BoatManager>(); }
// Start is called before the first frame update void Start() { GetBoatManager = this; }
public SpawnedPlayer(GameObject boat, RoomPlayerInfo info) { Boat = boat; Manager = boat.GetComponent<BoatManager>(); Positioning = new PositioningData(Boat.transform.position, Boat.transform.eulerAngles); ShootBuffer = new ShootingData(); HitBuffer = new List<HealthData>(); Info = info; Updated = true; }
public frmBoatAddEdit(Boat boat, BoatManager boatManager) { InitializeComponent(); _boatManager = boatManager; _boat = boat; }
public string UpdateBoat(int ID, string RegistrationNumber, string Manufacturer, int ModelYear, int Length) { return(BoatManager.UpdateBoat(ID, RegistrationNumber, Manufacturer, ModelYear, Length)); }
public string AddBoat(string registerNumber, string manufacturer, int modelYear, int length, int customerID) { return(BoatManager.AddBoat(registerNumber, manufacturer, modelYear, length, customerID)); }
// Use this for initialization void Start() { m_Words = GetComponentsInChildren<Renderer> (); m_BoatManager = BoatManager.Instance; }
public Boat[] GetAllBoats() { return(BoatManager.GetAllBoats().ToArray()); }
private void Start() { _boatManager = GameObject.FindGameObjectWithTag("Boat").GetComponent <BoatManager>(); _isLeftOar = _boatManager.isLeftOar(); }
public Boat GetBoatById(int id) { return(BoatManager.GetBoatById(id)); }