コード例 #1
0
ファイル: BombScript.cs プロジェクト: lasagnaphil/B-D
 // Use this for initialization
 void Start()
 {
     phaseManager = GameObject.Find("Player").GetComponent<PhaseScript>();
     player = GameObject.Find("Player").GetComponent<Transform>();
     /*bombText = Instantiate (Resources.Load ("BombText"), transform.position, Quaternion.identity) as GameObject;
     bombText.transform.SetParent (GameObject.Find ("BombCanvas").transform);
     Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint (Camera.main, transform.position);
     bombText.GetComponent<RectTransform>().anchoredPosition = screenPoint;*/
 }
コード例 #2
0
ファイル: BombScript.cs プロジェクト: lasagnaphil/B-D
    // Use this for initialization
    void Start()
    {
        phaseManager = GameObject.Find("Player").GetComponent <PhaseScript>();
        player       = GameObject.Find("Player").GetComponent <Transform>();

        /*bombText = Instantiate (Resources.Load ("BombText"), transform.position, Quaternion.identity) as GameObject;
         * bombText.transform.SetParent (GameObject.Find ("BombCanvas").transform);
         * Vector2 screenPoint = RectTransformUtility.WorldToScreenPoint (Camera.main, transform.position);
         * bombText.GetComponent<RectTransform>().anchoredPosition = screenPoint;*/
    }
コード例 #3
0
 void Start()
 {
     phaseScript = GameObject.Find("Player").GetComponent <PhaseScript>();
     DontDestroyOnLoad(GameObject.Find("Canvas"));
     DontDestroyOnLoad(GameObject.Find("Player"));
     DontDestroyOnLoad(GameObject.Find("UIManager"));
     DontDestroyOnLoad(GameObject.Find("BombCanvas"));
     DontDestroyOnLoad(gameObject);
     updatePhaseVariables(1);
 }
コード例 #4
0
 void Start()
 {
     phaseScript = GameObject.Find ("Player").GetComponent<PhaseScript>();
     DontDestroyOnLoad (GameObject.Find ("Canvas"));
     DontDestroyOnLoad (GameObject.Find ("Player"));
     DontDestroyOnLoad (GameObject.Find ("UIManager"));
     DontDestroyOnLoad (GameObject.Find ("BombCanvas"));
     DontDestroyOnLoad (gameObject);
     updatePhaseVariables (1);
 }
コード例 #5
0
ファイル: GlobalScript.cs プロジェクト: Izzu/Hearthstone-RTS
    // Use this for initialization
    void Start()
    {
        ourGlobalScript = this;

        ourUnitScripts = Object.FindObjectsOfType <UnitScript>();

        ourPlayerScripts = Object.FindObjectsOfType <PlayerScript>();

        ourCursorScript = Object.FindObjectOfType <CursorScript>();

        ourTurnScript = Object.FindObjectOfType <TurnScript>();

        ourPhaseScript = Object.FindObjectOfType <PhaseScript>();
    }
コード例 #6
0
ファイル: GlobalScript.cs プロジェクト: Izzu/Hearthstone-RTS
    // Use this for initialization
    void Start()
    {
        ourGlobalScript = this;

        ourUnitScripts = Object.FindObjectsOfType<UnitScript>();

        ourPlayerScripts = Object.FindObjectsOfType<PlayerScript>();

        ourCursorScript = Object.FindObjectOfType<CursorScript>();

        ourTurnScript = Object.FindObjectOfType<TurnScript>();

        ourPhaseScript = Object.FindObjectOfType<PhaseScript>();
    }
コード例 #7
0
ファイル: SceneManagerScript.cs プロジェクト: lasagnaphil/B-D
 void Start()
 {
     Color color = GetComponent<SpriteRenderer> ().color;
     color.a = 0.5f;
     GetComponent<SpriteRenderer> ().color = color;
     phaseScript = GameObject.Find ("Player").GetComponent<PhaseScript>();
     DontDestroyOnLoad (GameObject.Find ("Canvas"));
     DontDestroyOnLoad (GameObject.Find ("Player"));
     DontDestroyOnLoad (GameObject.Find ("UIManager"));
     DontDestroyOnLoad (GameObject.Find ("BombCanvas"));
     DontDestroyOnLoad (gameObject);
     levelNum = int.Parse(File.ReadAllText ("data.txt"));
     if (levelNum != 1)
         LoadLevel (levelNum);
     else
         updatePhaseVariables (1);
 }
コード例 #8
0
ファイル: SceneManagerScript.cs プロジェクト: lasagnaphil/B-D
    void Start()
    {
        Color color = GetComponent <SpriteRenderer> ().color;

        color.a = 0.5f;
        GetComponent <SpriteRenderer> ().color = color;
        phaseScript = GameObject.Find("Player").GetComponent <PhaseScript>();
        DontDestroyOnLoad(GameObject.Find("Canvas"));
        DontDestroyOnLoad(GameObject.Find("Player"));
        DontDestroyOnLoad(GameObject.Find("UIManager"));
        DontDestroyOnLoad(GameObject.Find("BombCanvas"));
        DontDestroyOnLoad(gameObject);
        levelNum = int.Parse(File.ReadAllText("data.txt"));
        if (levelNum != 1)
        {
            LoadLevel(levelNum);
        }
        else
        {
            updatePhaseVariables(1);
        }
    }
コード例 #9
0
ファイル: UIManagerScript.cs プロジェクト: lasagnaphil/B-D
 void Awake()
 {
     phaseManager = GameObject.Find("Player").GetComponent <PhaseScript> ();
 }
コード例 #10
0
ファイル: PlayerScript.cs プロジェクト: lasagnaphil/B-D
 void Awake()
 {
     anim         = GetComponent <Animator> ();
     rb2d         = GetComponent <Rigidbody2D> ();
     phaseManager = GetComponent <PhaseScript> ();
 }
コード例 #11
0
ファイル: PlayerScript.cs プロジェクト: lasagnaphil/B-D
 void Awake()
 {
     anim = GetComponent<Animator> ();
     rb2d = GetComponent<Rigidbody2D> ();
     phaseManager = GetComponent<PhaseScript> ();
 }
コード例 #12
0
ファイル: UIManagerScript.cs プロジェクト: lasagnaphil/B-D
 void Awake()
 {
     phaseManager = GameObject.Find ("Player").GetComponent<PhaseScript> ();
 }