Inheritance: MonoBehaviour
    /*[SerializeField] private PlayerView _patrolView;
     * public AIConfig aIConfig;
     * private SimplePatrolAIModel simplePatrolAIModel;
     * private EnemiesConfigurators enemiesConfigurator;
     * private SimplePatrolAI simplePatrolAI;*/


    private void Awake()
    {
        levelCompleteManager = new LevelCompleteManager(_playerView, _loose, _wins, _text);

        playerConfig = Resources.Load <SpriteAnimatorConfig>("AnimPlayerCfg");
        _playerAnimatorController = new SpriteAnimatorController(playerConfig);
        _playerAnimatorController.StartAnimation(_playerView._spriteRenderer, AnimState.Run, true, _animationSpeed);
        mainHeroPhysicsWalker = new MainHeroPhysicsWalker(_playerView, _playerAnimatorController);


        pinkyConfig = Resources.Load <SpriteAnimatorConfig>("AnimPinkyCfg");
        _pinkyAnimatorController = new SpriteAnimatorController(pinkyConfig);
        _pinkyAnimatorController.StartAnimation(_pinkyView._spriteRenderer, AnimState.Idle, true, _animationSpeed);
        pinkyWalker = new PinkyWalker(_pinkyView, _pinkyAnimatorController);

        waterConfig = Resources.Load <SpriteAnimatorConfig>("AnimWaterCfg");
        _waterAnimatorController = new SpriteAnimatorController(waterConfig);
        _waterAnimatorController.StartAnimation(_waterView._spriteRenderer, AnimState.Run, true, _animationSpeed);
        waterAnimation = new WaterAnimation(_waterView, _waterAnimatorController);


        aimingMuzzle = new AimingMuzzle(cannonView._muzzleTransform, cannonView._aimTransform);

        bulletsEmitter = new BulletsEmitter(cannonView._bullets, bulletsEmitterTransform);

        /*simplePatrolAIModel = new SimplePatrolAIModel(aIConfig);
         * simplePatrolAI = new SimplePatrolAI(_patrolView, simplePatrolAIModel);*/
    }
 void Start()
 {
     ftString = initialFollowerText.text;
     char[] delimitingChars = {'\n'};
     ftLines = ftString.Split (delimitingChars);
     ch = chatHandlerObj.GetComponent<ChatHandler> ();
     wani = waterAniObj.GetComponent<WaterAnimation> ();
 }
示例#3
0
 private void page_Loaded(object sender, RoutedEventArgs e)
 {
     TurtleRunAnimation.Begin();
     WaterAnimation.Begin();
     RunRace();
 }