コード例 #1
0
    private float characterHeight  = 1f;           //角色寬度

    private void Awake()
    {
        if (instance == null)
        {
            instance = this;
            DontDestroyOnLoad(this);
        }
        else if (this != instance)
        {
            Destroy(gameObject);
        }
    }
コード例 #2
0
 private void Awake()
 {
     planner = FindObjectOfType <SeatingPlanner>();
     canvas  = FindObjectOfType <Canvas>();
 }
コード例 #3
0
 private void Start()
 {
     seatingPlanner  = FindObjectOfType <SeatingPlanner>();
     gameObject.name = SeatIndexHelper.SeatIndexToKeyCode(index);
 }