Пример #1
0
 private void Awake()
 {
     instance     = this;
     aISteering   = GetComponent <AISteering>();
     pathFollower = GetComponent <PathFollower>();
     healthBar    = transform.GetChild(3).gameObject;
 }
Пример #2
0
 public SteveMovement(Steve steve)
 {
     this.steve = steve;
     horizontal = steve.horizontal;
     vertical = steve.vertical;
     this.bob = steve.bob;
 }
Пример #3
0
 public BobMovement(Bob bob)
 {
     this.bob = bob;
     horizontal = bob.horizontal;
     vertical = bob.vertical;
     this.steve = bob.steve;
 }
Пример #4
0
    private IEnumerator KillSteve(float seconds, Steve steve)
    {
        Instantiate(swoosh, transform.position + new Vector3(0.5f, 0, 0), Quaternion.identity);
        yield return(new WaitForSeconds(seconds));

        steve.OnDeath();
    }
Пример #5
0
    public void Populate(Steve steve)
    {
        int blueAmount   = 0;
        int greenAmount  = 0;
        int purpleAmount = 0;

        foreach (AdventurerType type in steve.HungerList)
        {
            switch (type)
            {
            case (AdventurerType.BLUE):
                blueAmount++;
                break;

            case (AdventurerType.GREEN):
                greenAmount++;
                break;

            case (AdventurerType.PURPLE):
                purpleAmount++;
                break;
            }
        }
        blue.text   = "x " + blueAmount;
        green.text  = "x " + greenAmount;
        purple.text = "x " + purpleAmount;
    }
Пример #6
0
 void Start()
 {
     menu          = GameObject.Find("EventSystem").GetComponent <Menu>();
     steve         = GameObject.Find("StevePaintable").GetComponent <Steve>();
     currentAction = BrushAction;
     currentColor  = Color.red;
 }
Пример #7
0
        public void Play(char symbol, int x, int y)
        {
            var symbolAsEnum = Steve.ConvertSymbol(symbol);
            var play         = new Play(symbolAsEnum, x, y);

            play.Validate(_lastSymbol, _board);

            UpdateGameState(symbolAsEnum, x, y);
        }
Пример #8
0
        static void Main(string[] args)
        {
            Johan newJohan = new Johan();

            Console.WriteLine("Lives: " + newJohan.lives);
            Console.WriteLine("Ability's: ");
            newJohan.Jump();
            Console.WriteLine("----------------------------------------");
            Steve newSteve = new Steve();

            Console.WriteLine("Lives: " + newSteve.lives);
            Console.WriteLine("Ability's: ");
            newSteve.Crouch();
            Console.WriteLine("----------------------------------------");
        }
Пример #9
0
 public char Winner()
 {
     return(Steve.ConvertSymbol(_board.Winner()));
 }
Пример #10
0
 void Start()
 {
     cam     = GetComponent <Camera>();
     actions = GetComponent <Actions>();
     steve   = GameObject.Find("StevePaintable").GetComponent <Steve>();
 }
Пример #11
0
 private void Start()
 {
     startPos = transform.localPosition;
     steve    = GetComponentInParent <Steve>();
 }
Пример #12
0
 public void GetConsumed(Steve steve)
 {
     isMoving = false;
     StartCoroutine(DestroyAfter(0.7f));
 }
Пример #13
0
 public void AttackSteve(Steve steve)
 {
     isMoving = false;
     StartCoroutine(KillSteve(0.5f, steve));
 }
Пример #14
0
 private void Awake()
 {
     rb    = GetComponent <Rigidbody>();
     steve = GetComponent <Steve>();
 }