/// ******************************************************* /// <summary>主砲発射処理</summary> /// ******************************************************* private void CreateShot(float direction, Transform pos) { GameObject self_go = Instantiate(ShotPrefab); ShotControll self_ctrl = self_go.GetComponent <ShotControll>(); self_ctrl.Position = pos.position; self_ctrl.Direction = direction; self_ctrl.Player = this; self_ctrl.ShotSpeed = ShotSpeed; self_go.SetActive(true); }
public void MirrorShot() { GameObject reflecteff = StageManager.Instance.InstantiateObject("Reflect".ToLower()); ShotControll self_ctrl = reflecteff.GetComponent <ShotControll>(); self_ctrl.Position = this.transform.position; self_ctrl.Direction = -this.transform.eulerAngles.z; self_ctrl.Player = PlayerControll.Instance; self_ctrl.ShotSpeed = PlayerControll.Instance.ShotSpeed; reflecteff.SetActive(true); }