Beispiel #1
0
 private void Awake()
 {
     rbody         = GetComponent <Rigidbody2D>();
     isoRenderer   = GetComponentInChildren <IsoCharacterRenderer>();
     playerReticle = GameObject.Find("Reticle");
     // Tilemap tilemap = this.transform.parent.GetComponent<Tilemap>();
     print("Temp:" + tilemap.WorldToCell(transform.position));
     // transform.position = tilemap.GetCellCenterWorld(cellPosition);
 }
 // Start is called before the first frame update
 void Start()
 {
     rbody       = GetComponent <Rigidbody2D>();
     isoRenderer = GetComponentInChildren <IsoCharacterRenderer>();
     _stats      = GetComponent <Temp_MC_Stats>();
     _direction  = new Vector3(1, 1, 0);
     _direction.Normalize();
     _muzzle_offset = new Vector3(0f, 0.3f, 0f);
     _nextAttack    = 0;
 }
Beispiel #3
0
 public void Awake()
 {
     movementSpeed = entity.data.baseSpeed;
     IsDamagable   = false;
     isoRend       = GetComponent <IsoCharacterRenderer>();
     rigidbody     = GetComponent <Rigidbody2D>();
     movementPath  = new List <Vector3>();
     if (variantPos)
     {
         tilePositionVariance = new Vector3(Random.Range(-0.12f, 0.12f), Random.Range(-0.12f, 0.12f), 0f);
     }
 }