Inheritance: MonoBehaviour
Exemple #1
0
 private void Awake()
 {
     toolHandler        = GetComponent <ToolHandler>();
     tilePointerBobbing = tilePointer.GetComponent <Bobbing>();
     nodeGrid           = FindObjectOfType <NodeGrid>();
     // on pathfind fail and success trigger the animation due to tools that interact one node ahead
     pathFind = new EntityPathFind(PathFindCallBack, gameObject, nodeGrid, FindObjectOfType <PathRequestManager>(), speed);
     //to hide the curser
     Cursor.visible = false;
     animator       = GetComponent <Animator>();
 }
Exemple #2
0
 // Start is called before the first frame update
 void Start()
 {
     playerScript = GameObject.FindGameObjectWithTag("Player").GetComponent <Player>(); // remove?
     sprite       = transform.GetChild(0).GetComponent <SpriteRenderer>();
     visual       = GetComponent <Bobbing>();
 }
 void Start()
 {
     visual = GetComponent <Bobbing>();
     sprite = transform.GetChild(0).GetComponent <SpriteRenderer>();
 }
Exemple #4
0
 private void ApplyBobbing(Bobbing bobbing)
 {
     bobSpeed  = bobbing.bobSpeed * EncumberanceModifier;
     bobAmount = bobbing.bobAmount * EncumberanceModifier;
 }