Exemplo n.º 1
0
    public BTLookAtAim(BehaviorTree t) : base(t)
    {
        //GET PLAYER TRANSFORM
        object o;
        bool   found = Tree.Blackboard.TryGetValue("NecroInput", out o);

        if (found)
        {
            necorInput = (NecromancerInput)o;
        }
        else
        {
            Debug.LogWarning(Tree.transform.name + "Could not get Necromancer Input");
        }

        found = Tree.Blackboard.TryGetValue("Transform", out o);

        if (found)
        {
            transform = (Transform)o;
            aim       = transform.GetComponent <AIAim>();
            sAnim     = transform.GetComponent <SkeletonAnimation>();
        }
        else
        {
            Debug.LogWarning(Tree.transform.name + "Transform not found for BTLookAtAim");
        }
    }
Exemplo n.º 2
0
    private void Start()
    {
        guide = GetComponent <MoveGuide>();
        //TODO set value to match foot radius;

        necroInput = GetComponent <NecromancerInput>();
        if (mainCamera == null)
        {
            mainCamera = Camera.main;
        }
    }
Exemplo n.º 3
0
 void Start()
 {
     input      = GetComponent <NecromancerInput>();
     bodyAnim   = transform.GetChild(1).GetChild(0).GetComponent <Animator>();
     bodySprite = transform.GetChild(1).GetChild(0).GetComponent <SpriteRenderer>();
 }