Inheritance: MonoBehaviour
コード例 #1
0
 private void Awake()
 {
     if (Instance != this)
     {
         Destroy(gameObject);
     }
     playerRaycast = FindObjectOfType <PlayerRaycast>();
     messagePopUp  = FindObjectOfType <MessagePopUp>();
 }
コード例 #2
0
ファイル: End.cs プロジェクト: tmxk061/486_AP
    //public List<float
    private void Start()
    {
        if (GameObject.Find("CraftTable").GetComponent <CraftTable_Mgr>().CreateMode == false)
        {
            mousepoint = Camera.main.GetComponent <Mousepoint>();
        }
        else
        {
            mousepoint = GameObject.Find("CreateCamera").GetComponent <Camera>().GetComponent <Mousepoint>();
        }

        try
        {
            playerRaycast = GameObject.FindWithTag("Player").GetComponent <PlayerRaycast>();
        }
        catch
        {
            playerRaycast = null;
        }

        Firstmake = false;
        Manager   = gameObject.GetComponentInParent <LineManager>();
    }
コード例 #3
0
 public void SetRaycast(PlayerRaycast raycast)
 {
     this.raycast = raycast;
 }
コード例 #4
0
 // Start is called before the first frame update
 void Start()
 {
     playerRaycastScript = GameObject.Find("Player").GetComponent <PlayerRaycast>();
 }
コード例 #5
0
 // Use this for initialization
 void Start()
 {
     driver   = GetComponent <PlayerDriver>();
     pRaycast = GetComponent <PlayerRaycast>();
 }
コード例 #6
0
ファイル: Player.cs プロジェクト: stefangrg/RPG-Components
 private void Awake()
 {
     playerInput   = GetComponent <PlayerInput>();
     playerRaycast = GetComponent <PlayerRaycast>();
 }