private void Awake()
 {
     if (instance == null)
     {
         instance = this;
     }
     else
     {
         Destroy(this);
     }
 }
示例#2
0
    private void Start()
    {
        state = State.Home;
        timer = 0.0f;

        homePosition = transform.position;
        homeRotation = transform.rotation;

        mManager = MechanicManager.instance;
        anim     = GetComponent <Animator>();

        taskButton = taskUI.transform.GetChild(0).GetChild(1).gameObject;
        UpdateTaskUI(null, "No Task");
    }