Example #1
0
 /// Deep Copy
 public AgentData(AgentData original)
 {
     position                = original.position;
     speed                   = original.speed;
     smoothedThrottleLerp    = original.smoothedThrottleLerp;
     animationCycle          = original.animationCycle;
     turningAmount           = original.turningAmount;
     swimAnimationCycleSpeed = original.swimAnimationCycleSpeed;
     spawnStartingScale      = original.spawnStartingScale;
     isInert                 = original.isInert;
     isActing                = original.isActing;
     isDecaying              = original.isDecaying;
     feedAnimDuration        = original.feedAnimDuration;
     feedAnimCooldown        = original.feedAnimCooldown;
     attackAnimDuration      = original.attackAnimDuration;
     attackAnimCooldown      = original.attackAnimCooldown;
     dashDuration            = original.dashDuration;
     dashCooldown            = original.dashCooldown;
     defendDuration          = original.defendDuration;
     defendCooldown          = original.defendCooldown;
     isResting               = original.isResting;
     cooldownDuration        = original.cooldownDuration;
     isMarkedForDeathByUser  = original.isMarkedForDeathByUser;
     curActionState          = original.curActionState;
     index                   = original.index;
     speciesIndex            = original.speciesIndex;
     curLifeStage            = original.curLifeStage;
 }
Example #2
0
    public AgentLifeStageData GetAgentLifeStageData(AgentLifeStage id, bool useSecondary = false)
    {
        foreach (var metadata in agentLifeStageData)
        {
            if (metadata.id == id)
            {
                return(metadata.GetData(useSecondary));
            }
        }

        return(defaultLifeStage.GetData(useSecondary));
    }
Example #3
0
 public Sprite GetAgentLifeStageIcon(AgentLifeStage id, bool useSecondary = false)
 {
     return(GetAgentLifeStageData(id, useSecondary).icon);
 }