コード例 #1
0
 // Use this for initialization
 void Start()
 {
     spiralWorldManager          = GetComponentInParent <SpiralWorldManager>();
     WorldPartyActions.Forward  += OnPartyForward;
     WorldPartyActions.Backward += OnPartyBackward;
     GetChildren();
     StartCoroutine(party.BeHungry(5));
 }
コード例 #2
0
 void Update()
 {
     if (active == null)
     {
         transform.Translate(SpiralWorldManager.TranslationToTarget(transform.position.x - offset,
                                                                    party.party.NumberLinePosition,
                                                                    movementSpeed * Time.deltaTime
                                                                    ));
     }
 }
コード例 #3
0
 // Use this for initialization
 void Start()
 {
     party = GetComponentInChildren <PartyComponent>();
     world = GetComponent <SpiralWorldManager>();
 }
コード例 #4
0
    // Update is called once per frame
    void Update()
    {
        Vector3 targetOffset = party.party.retreating ? position1 : position0;

        transform.Translate(SpiralWorldManager.TranslationToTarget(transform.position.x - targetOffset.x, party.party.NumberLinePosition, movementSpeed * Time.deltaTime));
    }
コード例 #5
0
 void Awake()
 {
     instance = this;
 }