Example #1
0
 public void Update()
 {
     if (ScreenHelper.isOutOfScreen(character.transform.position))
     {
         character.setPosition(characterStartingPosition);
     }
 }
Example #2
0
    public void Start()
    {
        if (sceneBackground != null)
        {
            sceneBackground.initBackground(1);
        }

        if (sceneHeroBuilder != null)
        {
            character = sceneHeroBuilder.buildHero();
            character.setPosition(characterStartingPosition);
            character.addToScene(gameObject);
            character.activate();
        }

        if (userControl != null)
        {
            userControl.OnMoveActionTrigger         += userMoveActionCallback;
            userControl.OnWeaponChangeActionTrigger += userChangeWeaponCallback;
        }
    }