void Start() { //initiation and evaluation shield = 0; bedManager = managerObject.GetComponent <BedManager>(); collisionManager = managerObject.GetComponent <CollisionManager>(); snakeBody = new List <Vector4>(); body = new List <GameObject>(); headPosition = new Vector2(20, 20); headDirection = Constants.HEAD_DIRECTION_RIGHT; overallManagerHandle = managerObject.GetComponent <OverallTileManager>(); homeManager = managerObject.GetComponent <HomeManager>(); followerHandle = cameraObject.GetComponent <SmoothFollow>(); followerHandle.updateTargetPosition(headPosition); followerHandle.updateSize(5); head = Instantiate(overallManagerHandle.avaliableSpritePrefabs[Constants.TO_SPRITE_ID_OFFSET], headPosition, transform.rotation); //TEST: with body /* * addBody(Constants.SPRITE_WOOD); * addBody(Constants.SPRITE_WOOD); * addBody(Constants.SPRITE_WOOD); * addBody(Constants.SPRITE_STONE); * addBody(Constants.SPRITE_WOOD); * addBody(Constants.SPRITE_WOOD); * addBody(Constants.SPRITE_STONE); */ //endtest makeASweetHome(headPosition + new Vector2(-2, 3)); }
// Use this for initialization void Start() { bedManager = GetComponent <BedManager>(); permenant = new List <Vector2Int>(); tileManager = gameObject.GetComponent <OverallTileManager>(); searchDirections = new int[4, 2] { { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, 0 } }; directions = new int[4, 2, 2] { { { -1, 0 }, { 1, 0 } }, { { 0, 1 }, { 0, -1 } }, { { 1, 0 }, { -1, 0 } }, { { 0, -1 }, { 0, 1 } } }; // homeBody = new List<Vector2Int>(); }
// Use this for initialization void Start() { beds = new List <Bed>(); bedPosition = new List <Vector2>(); tileManager = gameObject.GetComponent <OverallTileManager>(); }