Exemplo n.º 1
0
    private void Start()
    {
        UnityEngine.Debug.Log("CreatureComponent.Start", this);

        _thirdPersonCameraComponent = GetComponent <ThirdPersonCameraComponent>();

        _creatureState       = new CreatureState(typeName, gameObject);
        _creatureBodyVisual  = new CreatureBodyVisual();
        _creatureBodyPhysics = new CreatureBodyPhysics(gameObject, _creatureState);

        if (true == startHumanControlled)
        {
            GameComponent.SetHumanPlayer(0, this);
            _creatureController = new CreatureControllerHuman();
        }
        else
        {
            _creatureController = new CreatureControllerAI();
        }

        _creatureHud2D = new CreatureHud2D();
    }
	void Start()
	{
		playerControls = ReInput.players.GetPlayer(0);
		creature = GetComponent<ICreatureController>();
	}
 void CacheReferences()
 {
     creature = GetComponent <ICreatureController>();
 }
Exemplo n.º 4
0
 void Start()
 {
     playerControls = ReInput.players.GetPlayer(0);
     creature       = GetComponent <ICreatureController>();
 }
 protected void Awake() => creatureController = gameObject.GetComponent <CreatureController>();