예제 #1
0
파일: Animal.cs 프로젝트: Muldyy/DECO3850
    // Use this for initialization
    protected virtual void Start()
    {
        //Load the position and map position
        LoadPos();

        if (pathFinder == null)
        {
            pathFinder = PathFinder.Instance();
        }

        if (spawnControl == null)
        {
            spawnControl = SpawnControl.Instance();
        }
        facing = Direction.DONTMOVE;
    }
예제 #2
0
    // Use this for initialization
    protected virtual void Start()
    {
        //Load the position and map position
        LoadPos();

        //Set the animator
        animator = GetComponent <Animator> ();

        if (pathFinder == null)
        {
            pathFinder = PathFinder.Instance();
        }

        if (spawnControl == null)
        {
            spawnControl = SpawnControl.Instance();
        }
        facing = Direction.DONTMOVE;
    }
예제 #3
0
    // Use this for initialization
    protected virtual void Start()
    {
        //Generate a random life span
        lifeSpan = Random.Range(3000, 4000);

        //Load the position and map position
        LoadPos();

        if (spawnControl == null)
        {
            spawnControl = SpawnControl.Instance();
        }

        if (pathFinder == null)
        {
            pathFinder = PathFinder.Instance();
        }

        //set initial scale to zero
        Vector3 scale = new Vector3(0, 0, 1f);
        //transform.localScale = scale;
    }