コード例 #1
0
ファイル: Basic.cs プロジェクト: vzmc/ToraTora
 private void Start()
 {
     manager      = PlaySceneManager.Instance;
     renderers    = GetComponentsInChildren <Renderer>();
     IsInvincible = false;
     IsDead       = false;
 }
コード例 #2
0
ファイル: PlayerController.cs プロジェクト: SazFirst/DDuckRak
 void Start()
 {
     touchBar    = touchJudgement.GetComponent <BoxCollider2D>();
     touchEffect = touchEffectSpawner.GetComponent <TouchEffectSpawner>();
     note        = noteSpawner.GetComponent <NoteSpawner>();
     scene       = SceneManager.GetComponent <PlaySceneManager>();
 }
コード例 #3
0
ファイル: PlaySceneManager.cs プロジェクト: kuthreecar/Game
	void Awake() {
		if (instance==null) {
			instance = this;
		}
		else {
			Destroy (this);
		}
	}
コード例 #4
0
    public void ExitButton()
    {
        Sequence camSeq = DOTween.Sequence();

        camSeq.Append(mainCanvas.GetComponent <CanvasGroup>().DOFade(0f, .5f).SetEase(Ease.InQuad));

        camSeq.Append(transform.DOLookAt(exitExit.position, 2f).SetEase(Ease.InQuad));

        camSeq.Append(transform.DOMove(exitExit.position, 2f).SetEase(Ease.InQuad));

        PlaySceneManager.Exit();
    }
コード例 #5
0
    IEnumerator playScene(string name)
    {
        yield return(new WaitForSeconds(5f));

        mainCanvas.transform.GetChild(mainCanvas.transform.childCount - 1).GetComponent <Animator>().SetBool("Change", true);


        musicManager.PlayGameMusic();


        DOTween.KillAll();
        PlaySceneManager.MainMenuButton(name);
    }
コード例 #6
0
 void Awake()
 {
     SceneManager = this;
     Application.targetFrameRate = 60;           //目標FPSを60に設定
     oneGameTotalScore           = 0;
     baseColor = directionalLight.color;
     if (scoreText != null)
     {
         defaltScoreFontSize = scoreText.fontSize;
     }
     if (BGMs[0] != null)
     {
         StartCoroutine(BGMChenge(BGMs[0]));
     }
 }
コード例 #7
0
    protected virtual void OnEnable()
    {
        //所有者のスクリプト
        owner_cs = this.transform.parent.GetComponent <Player>();

        PSManager_cs = GameObject.Find("PlaySceneManager").GetComponent <PlaySceneManager>();
        hitEffect    = Resources.Load <GameObject>("prefab/Effect/Wave_01");

        MoziObj = this.transform.gameObject;

        // 持たれているプレイヤーを取得
        //parent = this.transform.parent.GetComponent<Player>();
        parentName = this.transform.parent.GetComponent <Player>().name;

        // タグの設定
        this.tag = "Weapon";
    }
コード例 #8
0
    new void Start()
    {
        //状態異常の初期化
        ButState.Stan = false;

        //上昇ステータス
        statesUp.Invincible   = false;
        statesUp.Substitution = false;

        controller = GetComponent <Contoroller2d>();
        PSM        = GameObject.Find("PlaySceneManager").transform.GetComponent <PlaySceneManager>();
        rig        = GetComponent <Rigidbody2D>();

        // プレイヤー同士の当たり判定をしない
        int P_layer = LayerMask.NameToLayer("Player");

        Physics2D.IgnoreLayerCollision(P_layer, P_layer);

        //HPゲージを取得する
        HPgageObj = PSM.SetHPgage(CNConvert(ControlerNamber) + 1);
    }
コード例 #9
0
    // Start is called before the first frame update
    void Start()
    {
        playSceneManager = (PlaySceneManager)NetworkRoomManagerExt.singleton.sceneManager;
        if (isLocalPlayer)
        {
            rig.AddComponent <OVRCameraRig>();
            OVRManager ovrmanager = rig.AddComponent <OVRManager>();
            ovrmanager.trackingOriginType = OVRManager.TrackingOrigin.FloorLevel;

            ovrHeadsetEmulator        = rig.AddComponent <OVRHeadsetEmulator>();
            ovrHeadsetEmulator.opMode = OVRHeadsetEmulator.OpMode.AlwaysOn;


            Camera cameraComponent = camera.AddComponent <Camera>();
            // camera.AddComponent<AudioListener>();
            camera.tag = "MainCamera";
            camera.AddComponent <OVRScreenFade>();
            // cameraComponent.nearClipPlane = 0.45f;
            cameraComponent.cullingMask = ~(1 << 9);
            for (int i = 0; i < models.Length; i++)
            {
                models[i].layer = 9;
            }
            body.tag = "Player";
            for (int i = 0; i < hands.Length; i++)
            {
                hands[i].tag = "Hand";
            }
            playSceneManager.SetPlayer(this);


            CmdSetPlayerZeroPos(PlayerPrefs.GetFloat("PlayerYZeroPos"));
        }

        playSceneManager.players.Add(this);
        rig.SetActive(true);
    }
コード例 #10
0
    private void Start()
    {
        playSceneManager = (PlaySceneManager)NetworkRoomManagerExt.singleton.sceneManager;

    }
コード例 #11
0
 void Start()
 {
     playScore = PlaySceneManager.GetScore();
     namekey   = nameBord.GetComponent <Name_bord>();
     ScoreShow();
 }
コード例 #12
0
 public void SetPlayScene(PlaySceneManager playScene)
 {
     this.playScene = playScene;
 }
コード例 #13
0
 private void Awake()
 {
     Instance = this;
 }
コード例 #14
0
ファイル: Weapon.cs プロジェクト: Hiromu68/Kaomoji_Fight2
    protected virtual void Start()
    {
        PSManager_cs = GameObject.Find("PlaySceneManager").GetComponent <PlaySceneManager>();

        SRenderer = this.transform.GetComponent <SpriteRenderer>();
    }