Пример #1
0
 void Start()
 {
     visuals        = GetComponent <VisualsManager>();
     navMeshAgent   = GetComponent <NavMeshAgent>();
     robotTransform = this.GetComponent <Transform>();
     moveSpeed      = navMeshAgent.speed;
 }
Пример #2
0
        public void Start()
        {
            visuals         = GetComponent <VisualsManager>();
            respawnLocation = transform.position;
            RobotManager.Instance.Register(this);
            RobotManager.Instance.OnRobotAdded += (robot) =>
            {
                if (robot != this)
                {
                    controls.archiveRobots.Add(new SubjectiveRobot()
                    {
                        id   = robot.id,
                        team = robot.team,
                    });
                }
            };

            name = $"Robot: {id}";

            controls.archiveRobots = new List <SubjectiveRobot>();
            controls.updatePickup  = new List <SubjectivePickup>();
            InitialDataFill();

            controls.goTo     = GoTo;
            controls.attack   = Attack;
            controls.passBall = PassBall;
        }
Пример #3
0
 // Start is called before the first frame update
 void Start()
 {
     visuals          = GetComponent <VisualsManager>();
     CurrentHP        = MaxHP;
     Slider.health    = CurrentHP;
     Slider.maxHealth = MaxHP;
 }
Пример #4
0
 private void Awake()
 {
     Instance = this;
 }